function taxonomy_term_depth_views_data_alter in Taxonomy Term Depth 8
Same name and namespace in other branches
- 8.2 taxonomy_term_depth.module \taxonomy_term_depth_views_data_alter()
Implements hook_views_data_alter().
File
- ./
taxonomy_term_depth.module, line 187 - Main module file.
Code
function taxonomy_term_depth_views_data_alter(array &$data) {
$data['taxonomy_term_field_data']['depth'] = array(
'title' => t('Depth (deprecated. Use depth_level)'),
'group' => t('Taxonomy term'),
'help' => t('Add depth value to sort and filter.'),
'field' => array(
'id' => 'numeric',
),
'sort' => array(
'id' => 'standard',
),
'filter' => array(
'help' => t('Filter by the depth value.'),
'id' => 'numeric',
),
);
$data['taxonomy_term_field_data']['depth_level'] = array(
'title' => t('Depth'),
'group' => t('Taxonomy term'),
'help' => t('Add depth value to sort and filter.'),
'field' => array(
'id' => 'numeric',
),
'sort' => array(
'id' => 'standard',
),
'filter' => array(
'help' => t('Filter by the depth value.'),
'id' => 'numeric',
),
);
return $data;
}