use Drupal\views\EntityViewsData;
/**
* Provides the views data for the taxonomy entity type.
*/
class TermViewsData extends EntityViewsData
{ /**
* {@inheritdoc}
*/
public function getViewsData() { $data = parent::
getViewsData();
$data['taxonomy_term_field_data'
]['table'
]['base'
]['help'
] =
$this->
t('Taxonomy terms are attached to nodes.'
);
$data['taxonomy_term_field_data'
]['table'
]['base'
]['access query tag'
] = 'taxonomy_term_access';
$data['taxonomy_term_field_data'
]['table'
]['wizard_id'
] = 'taxonomy_term';
$data['taxonomy_term_field_data'
]['table'
]['join'
] =
[ // This is provided for the many_to_one argument.
'taxonomy_index' =>
[ 'field' => 'tid',
'left_field' => 'tid',
],
];