-
Notifications
You must be signed in to change notification settings - Fork 0
/
word_link.views.inc
194 lines (179 loc) · 4.87 KB
/
word_link.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
/**
* @file
* Provide views data and handlers for word_link.module.
*/
/**
* Implements hook_views_data().
*/
function word_link_views_data() {
$data['word_link']['table']['group'] = t('Word Link');
$data['word_link']['table']['base'] = array(
'field' => 'id',
'title' => t('Word Link'),
'help' => t('Word Link'),
);
$data['word_link']['id'] = array(
'title' => t('Word ID'),
'help' => t('ID of the word'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
'numeric' => TRUE,
'name field' => 'id',
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['word_link']['text'] = array(
'title' => t('Word'),
'help' => t('Text of the word.'),
'field' => array(
'handler' => 'views_handler_field_markup',
'format' => filter_fallback_format(),
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['word_link']['case_sensitive'] = array(
'title' => t('Case sensitive'),
'help' => t('Case sensitivity of the word link.'),
'field' => array(
'handler' => 'views_handler_field_boolean',
'click sortable' => TRUE,
'output formats' => array(
'yes-no' => array(t('Yes'), t('No')),
),
),
'filter' => array(
'handler' => 'views_handler_filter_boolean_operator',
'label' => t('Case sensitive'),
'type' => 'yes-no',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['word_link']['url'] = array(
'title' => t('URL'),
'help' => t('URL of the word link.'),
'field' => array(
'handler' => 'views_handler_field_url',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
);
$data['word_link']['url_title'] = array(
'title' => t('URL title'),
'help' => t('Title of the word link.'),
'field' => array(
'handler' => 'views_handler_field_markup',
'format' => filter_fallback_format(),
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
);
$data['word_link']['class'] = array(
'title' => t('Class'),
'help' => t('Class of the word link.'),
'field' => array(
'handler' => 'views_handler_field_markup',
'format' => filter_fallback_format(),
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
);
$data['word_link']['visibility'] = array(
'field' => array(
'title' => t('Visibility'),
'help' => t('Visibility of the word link.'),
'handler' => 'word_link_handler_word_link_visibility',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['word_link']['weight'] = array(
'title' => t('Weight'),
'help' => t('Weight of the word link.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
);
$data['word_link']['rel'] = array(
'title' => t('Relationship'),
'help' => t('Rel attribute of the word link.'),
'field' => array(
'handler' => 'views_handler_field_markup',
'format' => filter_fallback_format(),
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
);
$data['word_link']['status'] = array(
'title' => t('Status'),
'help' => t('Whether or not the word is enabled.'),
'field' => array(
'handler' => 'views_handler_field_boolean',
'click sortable' => TRUE,
'output formats' => array(
'enabled-disabled' => array(t('Enabled'), t('Disabled')),
),
),
'filter' => array(
'handler' => 'views_handler_filter_boolean_operator',
'label' => t('Status'),
'type' => 'enabled-disabled',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['word_link']['operations'] = array(
'field' => array(
'title' => t('Operations'),
'help' => t('Provide an operations for editing/deleting a word.'),
'handler' => 'word_link_handler_word_link_operations',
),
);
return $data;
}