Skip to content
Snippets Groups Projects

Adding views join for BASE_TABLE_field_data

1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
@@ -30,6 +30,13 @@ function taxonomy_entity_index_views_data_alter(&$data) {
@@ -30,6 +30,13 @@ function taxonomy_entity_index_views_data_alter(&$data) {
'field' => $revisions ? 'revision_id' : 'entity_id',
'field' => $revisions ? 'revision_id' : 'entity_id',
];
];
 
if ($data_table = $info->getDataTable()) {
 
$data['taxonomy_entity_index']['table']['join'][$data_table] = [
 
'left_field' => $revisions ? $entity_keys['revision'] : $entity_keys['id'],
 
'field' => $revisions ? 'revision_id' : 'entity_id',
 
];
 
}
 
$data[$base_table]['taxonomy_entity_index_tid_depth'] = [
$data[$base_table]['taxonomy_entity_index_tid_depth'] = [
'help' => t('Display content if it has the selected taxonomy terms, or children of the selected terms. Due to additional complexity, this has fewer options than the versions without depth.'),
'help' => t('Display content if it has the selected taxonomy terms, or children of the selected terms. Due to additional complexity, this has fewer options than the versions without depth.'),
'group' => t('Taxonomy Entity Index'),
'group' => t('Taxonomy Entity Index'),
Loading