diff --git a/core/modules/file/src/FileViewsData.php b/core/modules/file/src/FileViewsData.php index cf8db29..ede4c30 100644 --- a/core/modules/file/src/FileViewsData.php +++ b/core/modules/file/src/FileViewsData.php @@ -105,13 +105,6 @@ public function getViewsData() { 'left_field' => 'tid', 'extra' => array(array('field' => 'type', 'value' => 'taxonomy_term')), ), - // Link ourself to the {taxonomy_vocabulary} table - // so we can provide taxonomy_vocabulary->file relationships. - 'taxonomy_vocabulary' => array( - 'field' => 'id', - 'left_field' => 'vid', - 'extra' => array(array('field' => 'type', 'value' => 'taxonomy_vocabulary')), - ), ); // Provide a relationship between the files table and each entity type, @@ -252,39 +245,6 @@ public function getViewsData() { ), ); - // Describes relationships between files and taxonomy_vocabulary items. - $data['file_usage']['file_to_taxonomy_vocabulary'] = array( - 'title' => t('Taxonomy Vocabulary'), - 'help' => t('A taxonomy vocabulary that is associated with this file, usually because this file is in a field on the taxonomy vocabulary.'), - // Only provide this field/relationship/etc., - // when the 'file_managed' base table is present. - 'skip base' => array('node_field_data', 'node_field_revision', 'users_field_data', 'comment_field_data', 'taxonomy_term_field_data', 'taxonomy_vocabulary'), - 'real field' => 'id', - 'relationship' => array( - 'title' => t('Taxonomy Vocabulary'), - 'label' => t('Taxonomy Vocabulary'), - 'base' => 'taxonomy_vocabulary', - 'base field' => 'vid', - 'relationship field' => 'id', - 'extra' => array(array('table' => 'file_usage', 'field' => 'type', 'operator' => '=', 'value' => 'taxonomy_vocabulary')), - ), - ); - $data['file_usage']['taxonomy_vocabulary_to_file'] = array( - 'title' => t('File'), - 'help' => t('A file that is associated with this taxonomy vocabulary, usually because it is in a field on the taxonomy vocabulary.'), - // Only provide this field/relationship/etc., - // when the 'taxonomy_vocabulary' base table is present. - 'skip base' => array('file_managed', 'node_field_data', 'node_field_revision', 'users_field_data', 'comment_field_data', 'taxonomy_term_field_data'), - 'real field' => 'fid', - 'relationship' => array( - 'title' => t('File'), - 'label' => t('File'), - 'base' => 'file_managed', - 'base field' => 'fid', - 'relationship field' => 'fid', - ), - ); - // Provide basic fields from the {file_usage} table to all of the base tables // we've declared joins to, because there is no 'skip base' property on these // fields. diff --git a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php index b387e6b..c81a47c 100644 --- a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php +++ b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php @@ -189,7 +189,7 @@ public function testDataTable() { $data = $this->viewsData->getViewsData(); $base_views_data = $data['entity_test']; - // Ensure that the base table it set to the data table. + // Ensure that the base table is set to the data table. $this->assertEquals('id', $data['entity_test_mul_property_data']['table']['base']['field']); $this->assertEquals('Entity test', $data['entity_test_mul_property_data']['table']['base']['title']); $this->assertFalse(isset($data['entity_test']['table']['base']));