You are here

function taxonomy_term_depth_views_data_alter in Taxonomy Term Depth 8.2

Same name and namespace in other branches
  1. 8 taxonomy_term_depth.module \taxonomy_term_depth_views_data_alter()

Implements hook_views_data_alter().

File

./taxonomy_term_depth.module, line 274
Main module file.

Code

function taxonomy_term_depth_views_data_alter(array &$data) {
  $data['taxonomy_term_field_data']['depth_level'] = [
    'title' => t('Depth'),
    'group' => t('Taxonomy term'),
    'help' => t('Add depth value to sort and filter.'),
    'field' => [
      'id' => 'numeric',
    ],
    'sort' => [
      'id' => 'standard',
    ],
    'filter' => [
      'help' => t('Filter by the depth value.'),
      'id' => 'numeric',
    ],
  ];
  return $data;
}