You are here

function taxonomy_views_data_alter in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 8.3 modules/taxonomy.views.inc \taxonomy_views_data_alter()
  2. 6.3 modules/taxonomy.views.inc \taxonomy_views_data_alter()
  3. 7.3 modules/taxonomy.views.inc \taxonomy_views_data_alter()

Implementation of hook_views_data_alter().

Related topics

File

modules/taxonomy.views.inc, line 364
Provide views data and handlers for taxonomy.module

Code

function taxonomy_views_data_alter(&$data) {
  $data['node']['term_node_tid'] = array(
    'group' => t('Taxonomy'),
    'title' => t('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' => 'term_data',
    ),
  );
  $data['node']['term_node_tid_depth'] = array(
    'group' => t('Taxonomy'),
    'title' => t('Term ID (with depth)'),
    'help' => t('The depth filter is more complex, so provides fewer options.'),
    'real field' => 'vid',
    'argument' => array(
      'handler' => 'views_handler_argument_term_node_tid_depth',
      'accept depth modifier' => TRUE,
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_term_node_tid_depth',
    ),
  );
  $data['node']['term_node_tid_depth_modifier'] = array(
    'group' => t('Taxonomy'),
    'title' => t('Term ID depth modifier'),
    'help' => t('Allows the "depth" for Taxonomy: Term ID (with depth) to be modified via an additional argument.'),
    'argument' => array(
      'handler' => 'views_handler_argument_term_node_tid_depth_modifier',
    ),
  );
}