-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtweet_link_compile.views.inc
112 lines (95 loc) · 3.23 KB
/
tweet_link_compile.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
102
103
104
105
106
107
108
109
110
111
112
<?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('Tweet links');
$data['tweet_link_compile']['table']['base'] = [
'field' => 'lkid',
'title' => t('Embedded links'),
'help' => t('Links embedded in tweets.'),
];
$data['tweet_link_compile']['lkid'] = [
'title' => t('Link 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('Tweet author handle'),
'help' => t('The handle of the user who made the tweet.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
$data['tweet_link_compile']['linkdestination'] = [
'title' => t('Link destination'),
'help' => t('External resource URL.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
$data['tweet_link_compile']['linktitle'] = [
'title' => t('Link 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('Parent tweet ID'),
'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'],
];
$data['tweet_link_compile_following'] = [];
$data['tweet_link_compile_following']['table'] = [];
// Base table.
$data['tweet_link_compile_following']['table']['group'] = t('Followed Twitter users');
$data['tweet_link_compile_following']['table']['base'] = [
'field' => 'lkuid',
'title' => t('Twitter users'),
'help' => t('People we are following.'),
];
$data['tweet_link_compile_following']['twitterhandle'] = [
'title' => t('Tweet author handle'),
'help' => t('Twitter name of the user who made the tweet.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
$data['tweet_link_compile_following']['lastcollectedtime'] = [
'title' => t('Profile image'),
'help' => t('Last collection time for this user.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
$data['tweet_link_compile_following']['lasttweetid'] = [
'title' => t('Most recent tweet'),
'help' => t('Most recent tweet from this user.'),
'field' => ['id' => 'standard'],
'filter' => ['id' => 'standard'],
'sort' => ['id' => 'standard'],
];
return $data;
}