function nodequeue_views_data_alter in Nodequeue 7.2
Same name and namespace in other branches
- 6.2 includes/views/nodequeue.views.inc \nodequeue_views_data_alter()
- 7.3 includes/views/nodequeue.views.inc \nodequeue_views_data_alter()
Implements hook_views_data_alter().
File
- includes/
views/ nodequeue.views.inc, line 239 - nodequeue.views.inc Provides support for the Views module.
Code
function nodequeue_views_data_alter(&$data) {
// queue relationship
$data['node']['nodequeue_rel'] = array(
'group' => t('Nodequeue'),
'title' => t('Queue'),
'help' => t('Create a relationship to a nodequeue.'),
'real field' => 'nid',
'relationship' => array(
'handler' => 'nodequeue_handler_relationship_nodequeue',
'base' => 'nodequeue_nodes',
'field' => 'nid',
'label' => t('queue'),
),
);
// links
$data['node']['nodequeue_links'] = array(
'group' => t('Nodequeue'),
'title' => t('Add/remove links'),
'help' => t('Display add/remove links for all eligible nodequeues. Note that this performs a node_load so could add many extra queries to a view.'),
'real field' => 'nid',
'field' => array(
'handler' => 'nodequeue_handler_field_links',
),
);
$data['node']['nodequeue_queue_tab'] = array(
'group' => t('Nodequeue'),
'title' => t('Link to tab'),
'help' => t('Display add/remove links for all eligible nodequeues. Note that this performs a node_load so could add many extra queries to a view.'),
'real field' => 'nid',
'field' => array(
'handler' => 'nodequeue_handler_field_queue_tab',
),
);
// all queues
$data['node']['nodequeue_all_queues'] = array(
'group' => t('Nodequeue'),
'title' => t('All queues'),
'help' => t('Display all queues a node is a member of.'),
'real field' => 'nid',
'field' => array(
'handler' => 'nodequeue_handler_field_all_queues',
),
);
// all subqueues
$data['node']['nodequeue_all_subqueues'] = array(
'group' => t('Nodequeue'),
'title' => t('All subqueues'),
'help' => t('Display all subqueues a node is a member of.'),
'real field' => 'nid',
'field' => array(
'handler' => 'nodequeue_handler_field_all_subqueues',
),
);
}