function taxonomy_views_data_alter
3.x taxonomy.views.inc | taxonomy_views_data_alter(&$data) |
2.x taxonomy.views.inc | taxonomy_views_data_alter(&$data) |
Implements hook_views_data_alter().
File
- modules/
taxonomy.views.inc, line 379 - Provide views data and handlers for taxonomy.module.
Code
function taxonomy_views_data_alter(&$data) {
$data['node']['term_node_tid'] = array(
'title' => t('Taxonomy terms on node'),
'help' => t('Relate nodes to taxonomy terms, specifiying which vocabulary or vocabularies to use. This relationship will cause duplicated records if there are multiple terms.'),
'relationship' => array(
'handler' => 'views_handler_relationship_node_term_data',
'label' => t('term'),
'base' => 'taxonomy_term_data',
),
'field' => array(
'title' => t('All taxonomy terms'),
'help' => t('Display all taxonomy terms associated with a node from specified vocabularies.'),
'handler' => 'views_handler_field_term_node_tid',
'no group by' => TRUE,
),
);
$data['node']['term_node_tid_depth'] = array(
'help' => t('Display content if it has the selected taxonomy terms, or children of the selected terms. Due to additional complexity, this has fewer options than the versions without depth.'),
'real field' => 'nid',
'argument' => array(
'title' => t('Has taxonomy term ID (with depth)'),
'handler' => 'views_handler_argument_term_node_tid_depth',
'accept depth modifier' => TRUE,
),
'filter' => array(
'title' => t('Has taxonomy terms (with depth)'),
'handler' => 'views_handler_filter_term_node_tid_depth',
),
);
$data['node']['term_node_tid_depth_modifier'] = array(
'title' => t('Has taxonomy term ID depth modifier'),
'help' => t('Allows the "depth" for Taxonomy: Term ID (with depth) to be modified via an additional contextual filter value.'),
'argument' => array(
'handler' => 'views_handler_argument_term_node_tid_depth_modifier',
),
);
}