function spaces_announce_views_tables in Spaces 5
Same name and namespace in other branches
- 5.2 spaces_announce/spaces_announce.module \spaces_announce_views_tables()
Implementation of hook_views_tables.
File
- spaces_announce/
spaces_announce.module, line 263
Code
function spaces_announce_views_tables() {
$tables['spaces_announce'] = array(
'name' => 'spaces_announce',
// 'provider' => 'internal',
'join' => array(
'left' => array(
'table' => 'node',
'field' => 'nid',
),
'right' => array(
'field' => 'nid',
),
),
'filters' => array(
'announce_cg' => array(
'name' => t('Announce: Posted in current group'),
'help' => t('Announcement was posted in current group. If page is not in any group context, no nodes are listed and thus a block would not appear.'),
'operator' => 'views_handler_operator_eqneq',
'list' => 'views_handler_filter_groupcurrent',
'list-type' => 'select',
'handler' => 'spaces_announce_handler_filter_cg',
),
),
);
$tables['spaces_announce_log'] = array(
'name' => 'spaces_announce_log',
// 'provider' => 'internal',
'join' => array(
'left' => array(
'table' => 'node',
'field' => 'nid',
),
'right' => array(
'field' => 'nid',
),
),
'fields' => array(
'count' => array(
'name' => t('Announce: Views Count'),
'sortable' => true,
'help' => t('This will display the number of times a node has been read.'),
),
'viewed' => array(
'name' => t('Announce: Last Viewed Time'),
'sortable' => true,
'handler' => views_handler_field_dates(),
'option' => 'string',
'help' => t('Display the time the node was last read.'),
),
),
);
return $tables;
}