You are here

function lineage_views_data in Taxonomy Lineage 6

Same name and namespace in other branches
  1. 7 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() {
  $tables['term_lineage'] = array(
    'table' => array(
      'group' => t('Taxonomy'),
      'join' => array(
        'node' => array(
          'left_table' => 'term_node',
          'left_field' => 'tid',
          'field' => 'tid',
        ),
        'term_data' => array(
          'left_field' => 'tid',
          'field' => 'tid',
        ),
      ),
    ),
    'lineage' => array(
      'title' => t("Hierarchy"),
      'field' => array(
        'handler' => 'lineage_handler_field',
        'click sortable' => TRUE,
        'help' => t('Taxonomy lineage hierarchy'),
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
    ),
    'depth' => array(
      'title' => t("Depth"),
      'field' => array(
        'handler' => 'views_handler_field',
        'help' => t('Taxonomy lineage depth'),
      ),
    ),
  );
  return $tables;
}