You are here

function lineage_views_data in Taxonomy Lineage 7

Same name and namespace in other branches
  1. 6 lineage.views.inc \lineage_views_data()

Implementation of hook_views_data().

File

./lineage.views.inc, line 11
Interface between lineage.module and views.module.

Code

function lineage_views_data() {
  $data['taxonomy_term_lineage'] = array(
    'table' => array(
      'group' => t('Taxonomy term'),
      'join' => array(
        'taxonomy_term_data' => array(
          'left_field' => 'tid',
          'field' => 'tid',
        ),
      ),
    ),
    'lineage' => array(
      'title' => t('Hierarchy'),
      'help' => t('The taxonomy lineage hierarchy.'),
      'field' => array(
        'handler' => 'lineage_handler_field',
        'click sortable' => TRUE,
      ),
      'filter' => array(
        'handler' => 'views_handler_filter_string',
        'help' => t('Taxonomy term lineage hierarchy.'),
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
      'argument' => array(
        'handler' => 'views_handler_argument_string',
        'help' => t('Taxonomy term lineage hierarchy.'),
      ),
    ),
    'depth' => array(
      'title' => t('Depth'),
      'help' => t('The taxonomy lineage depth.'),
      'field' => array(
        'handler' => 'views_handler_field_numeric',
        'click sortable' => TRUE,
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
      'filter' => array(
        'handler' => 'views_handler_filter_numeric',
        'help' => t('Taxonomy term lineage depth.'),
      ),
      'argument' => array(
        'handler' => 'views_handler_argument_numeric',
        'help' => t('Taxonomy term lineage depth.'),
      ),
    ),
  );
  return $data;
}