-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnotices.views.inc
More file actions
111 lines (109 loc) · 2.91 KB
/
notices.views.inc
File metadata and controls
111 lines (109 loc) · 2.91 KB
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
<?php
/**
* @file
* Provide views data for notices.module.
*/
/**
* Implements of hook_views_data().
*/
function notices_views_data() {
$data['notices'] = array(
'table' => array(
'base' => array(
'field' => 'noticeid',
'title' => t('Notices'),
'help' => 'notices holds the message information',
),
'group' => t('Notices'),
'join' => array(
'node' => array(
'left_field' => 'nid',
'field' => 'nid',
),
),
),
'noticeid' => array(
'title' => 'Noticeid',
'help' => t('Primary Key: Unique notice ID.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => FALSE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
),
'uid' => array(
'title' => t('Uid'),
'help' => t('The users.uid of the user who will receive the notice.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => FALSE,
),
'relationship' => array(
'base' => 'users',
'base field' => 'uid',
'handler' => 'views_handler_relationship',
'label' => t('recipient'),
'title' => t('Recipient'),
'help' => t('Relate notice to the user who will receive the notice.'),
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
),
'provider' => array(
'title' => t('Provider'),
'help' => t('Module system name that triggered this notification'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => FALSE,
),
),
'message' => array(
'title' => t('Message'),
'help' => t('Text of notice.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => FALSE,
),
),
'new' => array(
'title' => t('New'),
'help' => t('The flag for unread notice.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => FALSE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
),
'format' => array(
'title' => t('Format'),
'help' => t('The filter_format.format of the signature.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => FALSE,
),
),
'timestamp' => array(
'title' => t('Timestamp'),
'help' => t('Unix timestamp of when notice created.'),
'field' => array(
'handler' => 'views_handler_field_date',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort_date',
),
'filter' => array(
'handler' => 'views_handler_filter_date',
),
),
);
return $data;
}