-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_tweets.views.inc
101 lines (87 loc) · 2.82 KB
/
get_tweets.views.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* @file
* Provide views data for the tweet_link_compile module.
*/
/**
* Implements hook_views_data().
*/
function tweet_link_compile_views_data() {
$data = [];
$data['tweet_link_compile'] = [];
$data['tweet_link_compile']['table'] = [];
// Base table.
$data['tweet_link_compile']['table']['group'] = t('Embedded links');
$data['tweet_link_compile']['table']['base'] = [
'field' => 'lkid',
'title' => t('Embedded links'),
'help' => t('Links embedded in tweets.'),
];
// Join for files table.
// $data['tweet_link_compile']['table']['join']['file_managed'] = [
// 'left_field' => 'fid',
// 'field' => 'fid',
// ];.
$data['tweet_link_compile']['lkid'] = [
'title' => t('ID'),
'help' => t('The link ID of the extracted link.'),
'field' => ['id' => 'numeric'],
'filter' => ['id' => 'numeric'],
'sort' => ['id' => 'standard'],
'argument' => ['id' => 'numeric'],
];
$data['tweet_link_compile']['twitterhandle'] = [
'title' => t('User'),
'help' => t('Twitter handle of the user who made the tweet.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
$data['tweet_link_compile']['twitterprofileimagelink'] = [
'title' => t('User'),
'help' => t('Twitter user profile image.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
$data['tweet_link_compile']['linkdestination'] = [
'title' => t('External resource'),
'help' => t('External resource URL.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
$data['tweet_link_compile']['linktitle'] = [
'title' => t('Resource title'),
'help' => t('The title of the linked document.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
$data['tweet_link_compile']['tweetid'] = [
'title' => t('Tweet'),
'help' => t('The parent tweet for the link.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
'argument' => ['id' => 'string'],
];
$data['tweet_link_compile']['timetweeted'] = [
'title' => t('Time tweeted'),
'help' => t('Time stamp for the tweet.'),
'field' => ['id' => 'date'],
'filter' => ['id' => 'date'],
'sort' => ['id' => 'date'],
];
return $data;
}//end tweet_link_compile_views_data()
/*
* Implements hook_views_data_alter().
*/
// Function tweet_link_compile_views_data_alter(&$data) {
// Join for files table.
// $data['file_managed']['table']['join']['tweet_link_compile'] = [
// 'left_field' => 'fid',
// 'field' => 'fid',
// ];
// }.