function nodereferrer_views_data_alter in NodeReferrer 6
Same name and namespace in other branches
- 7 views/nodereferrer.views.inc \nodereferrer_views_data_alter()
@file nodereferrer.module Views integration
File
- views/
nodereferrer.views.inc, line 8 - nodereferrer.module Views integration
Code
function nodereferrer_views_data_alter(&$cache) {
$cache['node']['nodereferrer_field'] = array(
'group' => t('Node'),
'title' => t('Nodereferrer: by field'),
'real field' => 'nid',
'help' => t('Allows views to query the node\'s references by a certain node reference field.'),
'filter' => array(
'handler' => 'nodereferrer_view_handler_filter_field',
),
'argument' => array(
'handler' => 'nodereferrer_view_handler_argument_field',
),
'field' => array(
'handler' => 'nodereferrer_view_handler_field_field',
),
);
$cache['node']['nodereferrer_type'] = array(
'group' => t('Node'),
'title' => t('Nodereferrer: by node type'),
'real field' => 'nid',
'help' => t('Allows views to query the node\'s references by a certain node type.'),
'filter' => array(
'handler' => 'nodereferrer_view_handler_filter_type',
),
'argument' => array(
'handler' => 'nodereferrer_view_handler_argument_type',
),
'field' => array(
'handler' => 'nodereferrer_view_handler_field_type',
),
);
$cache['node']['nodereferer_referers'] = array(
'group' => t('Node'),
'relationship' => array(
'title' => t('Referrers'),
'label' => t('Referencing Nodes'),
'help' => t('Add a relationship to gain access to referencing nodes.'),
'relationship table' => 'node',
'relationship field' => 'nid',
'base' => 'node',
'field' => 'nid',
'handler' => 'nodereferrer_view_handler_relationship',
),
);
}