diff --git a/dynamic_entity_reference.views.inc b/dynamic_entity_reference.views.inc index ed8df5a..5b2bd11 100644 --- a/dynamic_entity_reference.views.inc +++ b/dynamic_entity_reference.views.inc @@ -5,6 +5,7 @@ * Provides views data for the dynamic_entity_reference module. */ +use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\field\FieldStorageConfigInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\dynamic_entity_reference\Plugin\Field\FieldType\DynamicEntityReferenceItem; @@ -106,6 +107,7 @@ function dynamic_entity_reference_field_views_data(FieldStorageConfigInterface $ * Implements hook_views_data(). * * Adds relationships for dynamic_entity_reference base fields. + * @todo remove this when https://www.drupal.org/node/2337515 is in. * * @return array */ @@ -118,10 +120,12 @@ function dynamic_entity_reference_views_data() { $fields_all = []; // Ensure origin and target entity types are SQL. foreach ($entity_manager->getDefinitions() as $entity_type) { + // \Drupal\views\EntityViewsData class only allows entities with + // \Drupal\Core\Entity\Sql\SqlEntityStorageInterface. if ($entity_type->hasHandlerClass('views_data') && $entity_manager->getStorage($entity_type->id()) instanceof SqlEntityStorageInterface) { $sql_entity_types[$entity_type->id()] = $entity_type->id(); // Only fieldable entities have base fields. - if ($entity_type->isSubclassOf('\Drupal\Core\Entity\FieldableEntityInterface')) { + if ($entity_type->isSubclassOf(FieldableEntityInterface::class)) { $entity_types[$entity_type->id()] = $entity_type; foreach ($entity_manager->getBaseFieldDefinitions($entity_type->id()) as $base_field) { if ($base_field->getType() == 'dynamic_entity_reference') { @@ -149,6 +153,7 @@ function dynamic_entity_reference_views_data() { // Unlimited (-1) or > 1 store field data in a dedicated table. $table = $base_table . ($field->getCardinality() != 1 ? '__' . $field_name : ''); + // @todo mention the reason here. $targets = array_intersect(DynamicEntityReferenceItem::getTargetTypes($field->getSettings()), array_keys($sql_entity_types)); foreach ($targets as $target_entity_type_id) { $target_entity_type = $entity_types[$target_entity_type_id]; diff --git a/src/Tests/Views/DynamicEntityReferenceBaseFieldRelationshipTest.php b/src/Tests/Views/DynamicEntityReferenceBaseFieldRelationshipTest.php index e274e2d..cf57d81 100644 --- a/src/Tests/Views/DynamicEntityReferenceBaseFieldRelationshipTest.php +++ b/src/Tests/Views/DynamicEntityReferenceBaseFieldRelationshipTest.php @@ -7,11 +7,8 @@ namespace Drupal\dynamic_entity_reference\Tests\Views; -use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\entity_test\Entity\EntityTest; use Drupal\entity_test\Entity\EntityTestMul; -use Drupal\field\Entity\FieldStorageConfig; -use Drupal\field\Entity\FieldConfig; use Drupal\views\Tests\ViewKernelTestBase; use Drupal\views\Tests\ViewTestData; use Drupal\views\Views; @@ -61,7 +58,7 @@ class DynamicEntityReferenceBaseFieldRelationshipTest extends ViewKernelTestBase $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); $this->installEntitySchema('entity_test_mul'); - static::$testViews = static::$testRun == 1 ? ['test_dynamic_entity_reference_entity_test_view'] : []; + static::$testViews = static::$testRun == 1 ? ['test_dynamic_entity_reference_entity_test_view', 'test_dynamic_entity_reference_entity_test_mul_view'] : ['test_dynamic_entity_reference_mul_entity_test_view', 'test_dynamic_entity_reference_mul_entity_test_mul_view']; ViewTestData::createTestViews(get_class($this), array('dynamic_entity_reference_entity_test')); } @@ -260,6 +257,95 @@ class DynamicEntityReferenceBaseFieldRelationshipTest extends ViewKernelTestBase // Test that the correct relationship entity is on the row. $this->assertEqual($row->_relationship_entities['reverse__entity_test_mul__dynamic_references']->id(), 2); $this->assertEqual($row->_relationship_entities['reverse__entity_test_mul__dynamic_references']->bundle(), 'entity_test_mul'); + + $view->destroy(); + // Check an actual test view. + $view = Views::getView('test_dynamic_entity_reference_entity_test_mul_view'); + $this->executeView($view); + $ids = [2, 3]; + foreach ($view->result as $index => $row) { + // Just check that the actual ID of the entity is the expected one. + $this->assertEqual($row->id, $ids[$index]); + // Also check that we have the correct result entity. + $this->assertEqual($row->_entity->id(), $ids[$index]); + $this->assertEqual($row->_entity->bundle(), 'entity_test_mul'); + if ($index) { + // Test the relationship. + $this->assertEqual($row->entity_test_mul_property_data_entity_test_mul_property_data_, 1); + + // Test that the correct relationship entity is on the row. + $this->assertEqual($row->_relationship_entities['entity_test_mul__dynamic_references']->id(), 1); + $this->assertEqual($row->_relationship_entities['entity_test_mul__dynamic_references']->bundle(), 'entity_test_mul'); + } + else { + // Test the relationship. + $this->assertNull($row->entity_test_mul_property_data_entity_test_mul_property_data_); + + // Test that the correct relationship entity is on the row. + $this->assertTrue(empty($row->_relationship_entities)); + } + } + + $view->destroy(); + $view->setDisplay('embed_1'); + $this->executeView($view); + + foreach ($view->result as $index => $row) { + // Just check that the actual ID of the entity is the expected one. + $this->assertEqual($row->id, $ids[$index]); + // Also check that we have the correct result entity. + $this->assertEqual($row->_entity->id(), $ids[$index]); + $this->assertEqual($row->_entity->bundle(), 'entity_test_mul'); + if (!$index) { + // Test the relationship. + $this->assertEqual($row->entity_test_entity_test_mul_property_data_id, 1); + + // Test that the correct relationship entity is on the row. + $this->assertEqual($row->_relationship_entities['entity_test__dynamic_references']->id(), 1); + $this->assertEqual($row->_relationship_entities['entity_test__dynamic_references']->bundle(), 'entity_test'); + } + else { + // Test the relationship. + $this->assertNull($row->entity_test_entity_test_mul_property_data_id); + + // Test that the correct relationship entity is on the row. + $this->assertTrue(empty($row->_relationship_entities)); + } + } + + $view->destroy(); + $view->setDisplay('embed_2'); + $this->executeView($view); + + $row = reset($view->result); + // Just check that the actual ID of the entity is the expected one. + $this->assertEqual($row->id, 1); + // Also check that we have the correct result entity. + $this->assertEqual($row->_entity->id(), 1); + $this->assertEqual($row->_entity->bundle(), 'entity_test_mul'); + // Test the relationship. + $this->assertEqual($row->entity_test_mul_property_data_entity_test_mul_property_data_, 3); + + // Test that the correct relationship entity is on the row. + $this->assertEqual($row->_relationship_entities['reverse__entity_test_mul__dynamic_references']->id(), 3); + $this->assertEqual($row->_relationship_entities['reverse__entity_test_mul__dynamic_references']->bundle(), 'entity_test_mul'); + + $view->destroy(); + $view->setDisplay('embed_3'); + $this->executeView($view); + + $row = reset($view->result); + // Just check that the actual ID of the entity is the expected one. + $this->assertEqual($row->id, 1); + // Also check that we have the correct result entity. + $this->assertEqual($row->_entity->id(), 1); + $this->assertEqual($row->_entity->bundle(), 'entity_test_mul'); + // Test the relationship. + $this->assertEqual($row->entity_test_entity_test_mul_property_data_id, 3); + + // Test that the correct relationship entity is on the row. + $this->assertEqual($row->_relationship_entities['reverse__entity_test__dynamic_references']->id(), 3); + $this->assertEqual($row->_relationship_entities['reverse__entity_test__dynamic_references']->bundle(), 'entity_test'); } /** @@ -270,12 +356,29 @@ class DynamicEntityReferenceBaseFieldRelationshipTest extends ViewKernelTestBase $entity_manager = \Drupal::entityManager(); $this->assertEqual($entity_manager->getBaseFieldDefinitions('entity_test')['dynamic_references']->getCardinality(), -1); $this->assertEqual($entity_manager->getBaseFieldDefinitions('entity_test_mul')['dynamic_references']->getCardinality(), -1); + // Create some test entities which link each other. $referenced_entity = EntityTest::create(); $referenced_entity->save(); $referenced_entity_mul = EntityTestMul::create(); $referenced_entity_mul->save(); + $entity = EntityTest::create(); + $entity->dynamic_references[] = $referenced_entity; + $entity->dynamic_references[] = $referenced_entity_mul; + $entity->save(); + $this->assertEqual($entity->dynamic_references[0]->entity->id(), $referenced_entity->id()); + $this->assertEqual($entity->dynamic_references[1]->entity->id(), $referenced_entity_mul->id()); + $this->entities[] = $entity; + + $entity = EntityTest::create(); + $entity->dynamic_references[] = $referenced_entity; + $entity->dynamic_references[] = $referenced_entity_mul; + $entity->save(); + $this->assertEqual($entity->dynamic_references[0]->entity->id(), $referenced_entity->id()); + $this->assertEqual($entity->dynamic_references[1]->entity->id(), $referenced_entity_mul->id()); + $this->entities[] = $entity; + $entity = EntityTestMul::create(); $entity->dynamic_references[] = $referenced_entity; $entity->dynamic_references[] = $referenced_entity_mul; @@ -389,38 +492,6 @@ class DynamicEntityReferenceBaseFieldRelationshipTest extends ViewKernelTestBase $this->assertEqual($views_data_entity_test_mul['reverse__entity_test_mul__dynamic_references']['relationship']['join_extra'][0]['field'], 'dynamic_references_target_type'); $this->assertEqual($views_data_entity_test_mul['reverse__entity_test_mul__dynamic_references']['relationship']['join_extra'][0]['value'], 'entity_test_mul'); // Check an actual test view. -/* $view = Views::getView('test_dynamic_entity_reference_entity_test_mul_view'); - $this->executeView($view); - - foreach ($view->result as $index => $row) { - $this->assertEqual($row->id, 1); - $this->assertEqual($row->_entity->id(), 1); - $this->assertEqual($row->_entity->bundle(), 'entity_test_mul'); - - // Test the backwards relationship. - $this->assertEqual($row->dynamic_references_entity_test_mul_property_data_id, $this->entities[$index]->id()); - - // Test that the correct relationship entity is on the row. - $this->assertEqual($row->_relationship_entities['reverse__entity_test_mul__dynamic_references']->id(), $this->entities[$index]->id()); - $this->assertEqual($row->_relationship_entities['reverse__entity_test_mul__dynamic_references']->bundle(), 'entity_test_mul'); - - } - - $view = Views::getView('test_dynamic_entity_reference_entity_test_rev_view'); - $this->executeView($view); - - foreach ($view->result as $index => $row) { - $this->assertEqual($row->id, 1); - $this->assertEqual($row->_entity->id(), 1); - $this->assertEqual($row->_entity->bundle(), 'entity_test'); - - // Test the backwards relationship. - $this->assertEqual($row->dynamic_references_entity_test_id, $this->entities[$index]->id()); - - // Test that the correct relationship entity is on the row. - $this->assertEqual($row->_relationship_entities['reverse__entity_test_mul__dynamic_references']->id(), $this->entities[$index]->id()); - $this->assertEqual($row->_relationship_entities['reverse__entity_test_mul__dynamic_references']->bundle(), 'entity_test_mul'); - }*/ } } diff --git a/tests/modules/dynamic_entity_reference_entity_test/dynamic_entity_reference_entity_test.module b/tests/modules/dynamic_entity_reference_entity_test/dynamic_entity_reference_entity_test.module index ddf2158..eb5a09a 100644 --- a/tests/modules/dynamic_entity_reference_entity_test/dynamic_entity_reference_entity_test.module +++ b/tests/modules/dynamic_entity_reference_entity_test/dynamic_entity_reference_entity_test.module @@ -59,3 +59,218 @@ function dynamic_entity_reference_entity_test_entity_base_field_info(EntityTypeI return $fields; } + +/** + * Implements hook_views_data(). + */ +function dynamic_entity_reference_entity_test_views_data() { + // @todo Currently views integration for multivalue basefields is broken this + // function adds a temporary fix for that remove this when is fixed + // https://www.drupal.org/node/2477899. + $data = []; + // @todo use \Drupal::state()->get('dynamic_entity_reference_entity_test', 0); here. + if (DynamicEntityReferenceBaseFieldRelationshipTest::$testRun) { + $data['entity_test__dynamic_references'] = [ + 'table' => [ + 'join' => [ + 'entity_test' => [ + 'left_field' => 'id', + 'field' => 'entity_id', + ], + ], + ], + 'dynamic_references' => [ + 'group' => "Test entity", + 'title' => "Test references", + 'title short' => "Test references", + 'help' => "Appears in: entity_test.", + 'field' => [ + 'table' => "entity_test__dynamic_references", + 'id' => "field", + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + 'real field' => "dynamic_references_type_id", + 'additional fields' => [ + "delta", + "langcode", + "bundle", + "dynamic_references_target_id", + "dynamic_references_target_type", + ], + 'element type' => "div", + 'is revision' => FALSE, + 'click sortable' => TRUE, + ], + ], + 'dynamic_references_target_id' => [ + 'group' => "Test entity", + 'title' => "Test references (dynamic_references)", + 'title short' => "Test references", + 'help' => "Appears in: entity_test.", + 'argument' => [ + 'field' => "dynamic_references_target_id", + 'table' => "entity_test__dynamic_references", + 'id' => "numeric", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + 'empty field name' => "- No value -", + ], + 'filter' => [ + 'field' => "dynamic_references_target_id", + 'table' => "entity_test__dynamic_references", + 'id' => "numeric", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + 'allow empty' => TRUE, + ], + 'sort' => [ + 'field' => "dynamic_references_target_id", + 'table' => "entity_test__dynamic_references", + 'id' => "standard", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + ], + ], + 'dynamic_references_target_type' => [ + 'group' => "Test entity", + 'title' => "Test references (dynamic_references:target_type)", + 'title short' => "Test references:target_type", + 'help' => "Appears in: entity_test.", + 'argument' => [ + 'field' => "dynamic_references_target_type", + 'table' => "entity_test__dynamic_references", + 'id' => "string", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + 'empty field name' => "- No value -", + ], + 'filter' => [ + 'field' => "dynamic_references_target_type", + 'table' => "entity_test__dynamic_references", + 'id' => "string", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + 'allow empty' => TRUE, + ], + 'sort' => [ + 'field' => "dynamic_references_target_type", + 'table' => "entity_test__dynamic_references", + 'id' => "standard", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + ], + ], + ]; + $data['entity_test_mul_property_data__dynamic_references'] = [ + 'table' => [ + 'join' => [ + 'entity_test_mul_property_data' => [ + 'left_field' => 'id', + 'field' => 'entity_id', + 'extra' => [ + [ + 'left_field' => 'langcode', + 'field' => 'langcode' + ], + ], + ], + ], + ], + 'dynamic_references' => [ + 'group' => "Test entity - data table", + 'title' => "Test references", + 'title short' => "Test references", + 'help' => "Appears in: entity_test_mul.", + 'field' => [ + 'table' => "entity_test__dynamic_references", + 'id' => "field", + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test_mul", + 'real field' => "dynamic_references_type_id", + 'additional fields' => [ + "delta", + "langcode", + "bundle", + "dynamic_references_target_id", + "dynamic_references_target_type", + ], + 'element type' => "div", + 'is revision' => FALSE, + 'click sortable' => TRUE, + ], + ], + 'dynamic_references_target_id' => [ + 'group' => "Test entity - data table", + 'title' => "Test references (dynamic_references)", + 'title short' => "Test references", + 'help' => "Appears in: entity_test_mul.", + 'argument' => [ + 'field' => "dynamic_references_target_id", + 'table' => "entity_test__dynamic_references", + 'id' => "numeric", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test_mul", + 'empty field name' => "- No value -", + ], + 'filter' => [ + 'field' => "dynamic_references_target_id", + 'table' => "entity_test__dynamic_references", + 'id' => "numeric", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test_mul", + 'allow empty' => TRUE, + ], + 'sort' => [ + 'field' => "dynamic_references_target_id", + 'table' => "entity_test__dynamic_references", + 'id' => "standard", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test_mul", + ], + ], + 'dynamic_references_target_type' => [ + 'group' => "Test entity - data table", + 'title' => "Test references (dynamic_references:target_type)", + 'title short' => "Test references:target_type", + 'help' => "Appears in: entity_test.", + 'argument' => [ + 'field' => "dynamic_references_target_type", + 'table' => "entity_test__dynamic_references", + 'id' => "string", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + 'empty field name' => "- No value -", + ], + 'filter' => [ + 'field' => "dynamic_references_target_type", + 'table' => "entity_test__dynamic_references", + 'id' => "string", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + 'allow empty' => TRUE, + ], + 'sort' => [ + 'field' => "dynamic_references_target_type", + 'table' => "entity_test__dynamic_references", + 'id' => "standard", + 'additional fields' => [], + 'field_name' => "dynamic_references", + 'entity_type' => "entity_test", + ], + ], + ]; + + } + return $data; +} diff --git a/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml b/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_mul_view.yml similarity index 84% copy from tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml copy to tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_mul_view.yml index 3091161..285af74 100644 --- a/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml +++ b/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_mul_view.yml @@ -1,15 +1,14 @@ -uuid: 829d017d-52d6-428e-8400-c15272aea3fc langcode: en status: true dependencies: module: - entity_test -id: test_dynamic_entity_reference_entity_test_view -label: test_dynamic_entity_reference_entity_test_view +id: test_dynamic_entity_reference_entity_test_mul_view +label: test_dynamic_entity_reference_entity_test_mul_view module: views description: '' tag: '' -base_table: entity_test +base_table: entity_test_mul_property_data base_field: id core: 8.x display: @@ -81,16 +80,16 @@ display: fields: id: id: id - table: entity_test + table: entity_test_mul_property_data field: id - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field id_1: id: id_1 - table: entity_test + table: entity_test_mul_property_data field: id - relationship: entity_test__dynamic_references + relationship: entity_test_mul__dynamic_references group_type: group admin_label: '' label: '' @@ -149,22 +148,19 @@ display: multi_type: separator separator: ', ' field_api_classes: false - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field filters: - dynamic_references__target_id: - id: dynamic_references__target_id - table: entity_test - field: dynamic_references__target_id - relationship: reverse__entity_test__dynamic_references + dynamic_references__target_type: + id: dynamic_references__target_type + table: entity_test_mul_property_data + field: dynamic_references__target_type + relationship: none group_type: group admin_label: '' operator: 'not empty' - value: - min: '' - max: '' - value: '' + value: '' group: 1 exposed: false expose: @@ -191,47 +187,31 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: entity_test + entity_type: entity_test_mul entity_field: dynamic_references - plugin_id: numeric + plugin_id: string sorts: id: id: id - table: entity_test + table: entity_test_mul_property_data field: id - relationship: none - group_type: group - admin_label: '' - order: ASC - exposed: false - expose: - label: '' - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: standard header: { } footer: { } empty: { } relationships: - entity_test__dynamic_references: - id: entity_test__dynamic_references - table: entity_test - field: entity_test__dynamic_references - relationship: none - group_type: group - admin_label: 'References: Test entity' - required: false - entity_type: entity_test + entity_test_mul__dynamic_references: + id: entity_test_mul__dynamic_references + table: entity_test_mul_property_data + field: entity_test_mul__dynamic_references + entity_type: entity_test_mul plugin_id: standard arguments: { } display_extenders: { } - filter_groups: - operator: AND - groups: - 1: AND cache_metadata: contexts: - - entity_test_view_grants - 'languages:language_content' - 'languages:language_interface' - url.query_args @@ -243,39 +223,34 @@ display: position: 1 display_options: display_extenders: { } - relationships: - entity_test_mul__dynamic_references: - id: entity_test_mul__dynamic_references - table: entity_test - field: entity_test_mul__dynamic_references - relationship: none - group_type: group - admin_label: 'References: Test entity - data table' - required: false - entity_type: entity_test - plugin_id: standard - defaults: - relationships: false - fields: false fields: id: id: id - table: entity_test + table: entity_test_mul_property_data field: id - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field id_1: id: id_1 - table: entity_test_mul + table: entity_test field: id - entity_type: entity_test_mul + entity_type: entity_test entity_field: id plugin_id: field - relationship: entity_test_mul__dynamic_references + relationship: entity_test__dynamic_references + defaults: + fields: false + relationships: false + relationships: + entity_test__dynamic_references: + id: entity_test__dynamic_references + table: entity_test_mul_property_data + field: entity_test__dynamic_references + entity_type: entity_test_mul + plugin_id: standard cache_metadata: contexts: - - entity_test_view_grants - 'languages:language_content' - 'languages:language_interface' - url.query_args @@ -284,85 +259,34 @@ display: display_plugin: embed id: embed_2 display_title: 'Embed 2' - position: 3 + position: 2 display_options: display_extenders: { } - display_description: '' relationships: - reverse__entity_test__dynamic_references: - id: reverse__entity_test__dynamic_references - table: entity_test - field: reverse__entity_test__dynamic_references - relationship: none - group_type: group - admin_label: 'Reverse reference to References base field on Test entity' - required: false - entity_type: entity_test + reverse__entity_test_mul__dynamic_references: + id: reverse__entity_test_mul__dynamic_references + table: entity_test_mul_property_data + field: reverse__entity_test_mul__dynamic_references + entity_type: entity_test_mul plugin_id: standard defaults: relationships: false + fields: false filters: false filter_groups: false - fields: false - filters: - dynamic_references__target_id: - id: dynamic_references__target_id - table: entity_test - field: dynamic_references__target_id - relationship: reverse__entity_test__dynamic_references - group_type: group - admin_label: '' - operator: 'not empty' - value: - min: '' - max: '' - value: '' - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - entity_type: entity_test - entity_field: dynamic_references - plugin_id: numeric - filter_groups: - operator: AND - groups: - 1: AND fields: id: id: id - table: entity_test + table: entity_test_mul_property_data field: id - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field id_1: id: id_1 - table: entity_test + table: entity_test_mul_property_data field: id - relationship: reverse__entity_test__dynamic_references + relationship: reverse__entity_test_mul__dynamic_references group_type: group admin_label: '' label: '' @@ -421,12 +345,54 @@ display: multi_type: separator separator: ', ' field_api_classes: false - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field + filters: + dynamic_references__target_type: + id: dynamic_references__target_type + table: entity_test_mul_property_data + field: dynamic_references__target_type + relationship: reverse__entity_test_mul__dynamic_references + group_type: group + admin_label: '' + operator: 'not empty' + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: entity_test_mul + entity_field: dynamic_references + plugin_id: string + filter_groups: + operator: AND + groups: + 1: AND cache_metadata: contexts: - - entity_test_view_grants - 'languages:language_content' - 'languages:language_interface' - url.query_args @@ -438,32 +404,19 @@ display: position: 3 display_options: display_extenders: { } - display_description: '' - relationships: - reverse__entity_test_mul__dynamic_references: - id: reverse__entity_test_mul__dynamic_references - table: entity_test - field: reverse__entity_test_mul__dynamic_references - entity_type: entity_test - plugin_id: standard - defaults: - relationships: false - filters: false - filter_groups: false - fields: false fields: id: id: id - table: entity_test + table: entity_test_mul_property_data field: id - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field id_1: id: id_1 - table: entity_test_mul + table: entity_test field: id - relationship: reverse__entity_test_mul__dynamic_references + relationship: reverse__entity_test__dynamic_references group_type: group admin_label: '' label: '' @@ -522,22 +475,32 @@ display: multi_type: separator separator: ', ' field_api_classes: false - entity_type: entity_test_mul + entity_type: entity_test entity_field: id plugin_id: field - filters: - id: - id: id + defaults: + fields: false + relationships: false + filters: false + filter_groups: false + relationships: + reverse__entity_test__dynamic_references: + id: reverse__entity_test__dynamic_references table: entity_test_mul_property_data - field: id - relationship: reverse__entity_test_mul__dynamic_references + field: reverse__entity_test__dynamic_references + entity_type: entity_test_mul + plugin_id: standard + display_description: '' + filters: + dynamic_references__target_type_1: + id: dynamic_references__target_type_1 + table: entity_test + field: dynamic_references__target_type + relationship: reverse__entity_test__dynamic_references group_type: group admin_label: '' operator: 'not empty' - value: - min: '' - max: '' - value: '' + value: '' group: 1 exposed: false expose: @@ -564,16 +527,15 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: entity_test_mul - entity_field: id - plugin_id: numeric + entity_type: entity_test + entity_field: dynamic_references + plugin_id: string filter_groups: operator: AND groups: 1: AND cache_metadata: contexts: - - entity_test_view_grants - 'languages:language_content' - 'languages:language_interface' - url.query_args diff --git a/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml b/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml index 3091161..9523a78 100644 --- a/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml +++ b/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml @@ -1,4 +1,3 @@ -uuid: 829d017d-52d6-428e-8400-c15272aea3fc langcode: en status: true dependencies: diff --git a/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml b/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_mul_entity_test_mul_view.yml similarity index 71% copy from tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml copy to tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_mul_entity_test_mul_view.yml index 3091161..6c680de 100644 --- a/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml +++ b/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_mul_entity_test_mul_view.yml @@ -1,15 +1,14 @@ -uuid: 829d017d-52d6-428e-8400-c15272aea3fc langcode: en status: true dependencies: module: - entity_test -id: test_dynamic_entity_reference_entity_test_view -label: test_dynamic_entity_reference_entity_test_view +id: test_dynamic_entity_reference_mul_entity_test_mul_view +label: test_dynamic_entity_reference_mul_entity_test_mul_view module: views description: '' tag: '' -base_table: entity_test +base_table: entity_test_mul_property_data base_field: id core: 8.x display: @@ -81,16 +80,16 @@ display: fields: id: id: id - table: entity_test + table: entity_test_mul_property_data field: id - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field id_1: id: id_1 - table: entity_test + table: entity_test_mul_property_data field: id - relationship: entity_test__dynamic_references + relationship: entity_test_mul__dynamic_references group_type: group admin_label: '' label: '' @@ -149,22 +148,19 @@ display: multi_type: separator separator: ', ' field_api_classes: false - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field filters: - dynamic_references__target_id: - id: dynamic_references__target_id - table: entity_test - field: dynamic_references__target_id - relationship: reverse__entity_test__dynamic_references + dynamic_references_target_type: + id: dynamic_references_target_type + table: entity_test_mul_property_data__dynamic_references + field: dynamic_references_target_type + relationship: none group_type: group admin_label: '' operator: 'not empty' - value: - min: '' - max: '' - value: '' + value: '' group: 1 exposed: false expose: @@ -191,47 +187,64 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: entity_test - entity_field: dynamic_references - plugin_id: numeric - sorts: - id: - id: id - table: entity_test - field: id + plugin_id: string + dynamic_references_target_type_1: + id: dynamic_references_target_type_1 + table: entity_test_mul_property_data__dynamic_references + field: dynamic_references_target_type relationship: none group_type: group admin_label: '' - order: ASC + operator: '=' + value: enity_test_mul + group: 1 exposed: false expose: + operator_id: '' label: '' - entity_type: entity_test + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: string + sorts: + id: + id: id + table: entity_test_mul_property_data + field: id + entity_type: entity_test_mul entity_field: id plugin_id: standard header: { } footer: { } empty: { } relationships: - entity_test__dynamic_references: - id: entity_test__dynamic_references - table: entity_test - field: entity_test__dynamic_references - relationship: none - group_type: group - admin_label: 'References: Test entity' - required: false - entity_type: entity_test + entity_test_mul__dynamic_references: + id: entity_test_mul__dynamic_references + table: entity_test_mul_property_data__dynamic_references + field: entity_test_mul__dynamic_references plugin_id: standard arguments: { } display_extenders: { } - filter_groups: - operator: AND - groups: - 1: AND cache_metadata: contexts: - - entity_test_view_grants - 'languages:language_content' - 'languages:language_interface' - url.query_args @@ -243,80 +256,37 @@ display: position: 1 display_options: display_extenders: { } - relationships: - entity_test_mul__dynamic_references: - id: entity_test_mul__dynamic_references - table: entity_test - field: entity_test_mul__dynamic_references - relationship: none - group_type: group - admin_label: 'References: Test entity - data table' - required: false - entity_type: entity_test - plugin_id: standard - defaults: - relationships: false - fields: false fields: id: id: id - table: entity_test + table: entity_test_mul_property_data field: id - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field id_1: id: id_1 - table: entity_test_mul + table: entity_test field: id - entity_type: entity_test_mul + entity_type: entity_test entity_field: id plugin_id: field - relationship: entity_test_mul__dynamic_references - cache_metadata: - contexts: - - entity_test_view_grants - - 'languages:language_content' - - 'languages:language_interface' - - url.query_args - cacheable: false - embed_2: - display_plugin: embed - id: embed_2 - display_title: 'Embed 2' - position: 3 - display_options: - display_extenders: { } - display_description: '' - relationships: - reverse__entity_test__dynamic_references: - id: reverse__entity_test__dynamic_references - table: entity_test - field: reverse__entity_test__dynamic_references - relationship: none - group_type: group - admin_label: 'Reverse reference to References base field on Test entity' - required: false - entity_type: entity_test - plugin_id: standard + relationship: entity_test__dynamic_references defaults: - relationships: false + fields: false filters: false filter_groups: false - fields: false + relationships: false filters: - dynamic_references__target_id: - id: dynamic_references__target_id - table: entity_test - field: dynamic_references__target_id - relationship: reverse__entity_test__dynamic_references + dynamic_references_target_type: + id: dynamic_references_target_type + table: entity_test_mul_property_data__dynamic_references + field: dynamic_references_target_type + relationship: none group_type: group admin_label: '' operator: 'not empty' - value: - min: '' - max: '' - value: '' + value: '' group: 1 exposed: false expose: @@ -343,125 +313,87 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: entity_test - entity_field: dynamic_references - plugin_id: numeric + plugin_id: string + dynamic_references_target_type_1: + id: dynamic_references_target_type_1 + table: entity_test_mul_property_data__dynamic_references + field: dynamic_references_target_type + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: enity_test + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: string filter_groups: operator: AND groups: 1: AND - fields: - id: - id: id - table: entity_test - field: id - entity_type: entity_test - entity_field: id - plugin_id: field - id_1: - id: id_1 - table: entity_test - field: id - relationship: reverse__entity_test__dynamic_references - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: number_integer - settings: - thousand_separator: '' - prefix_suffix: true - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - entity_type: entity_test - entity_field: id - plugin_id: field + relationships: + entity_test__dynamic_references: + id: entity_test__dynamic_references + table: entity_test_mul_property_data__dynamic_references + field: entity_test__dynamic_references + plugin_id: standard cache_metadata: contexts: - - entity_test_view_grants - 'languages:language_content' - 'languages:language_interface' - url.query_args cacheable: false - embed_3: + embed_2: display_plugin: embed - id: embed_3 - display_title: 'Embed 3' - position: 3 + id: embed_2 + display_title: 'Embed 2' + position: 2 display_options: display_extenders: { } - display_description: '' relationships: reverse__entity_test_mul__dynamic_references: id: reverse__entity_test_mul__dynamic_references - table: entity_test + table: entity_test_mul_property_data field: reverse__entity_test_mul__dynamic_references - entity_type: entity_test - plugin_id: standard + entity_type: entity_test_mul + plugin_id: entity_reverse defaults: relationships: false - filters: false - filter_groups: false fields: false fields: id: id: id - table: entity_test + table: entity_test_mul_property_data field: id - entity_type: entity_test + entity_type: entity_test_mul entity_field: id plugin_id: field id_1: id: id_1 - table: entity_test_mul + table: entity_test_mul_property_data field: id relationship: reverse__entity_test_mul__dynamic_references group_type: group @@ -525,19 +457,29 @@ display: entity_type: entity_test_mul entity_field: id plugin_id: field + cache_metadata: + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + cacheable: false + embed_3: + display_plugin: embed + id: embed_3 + display_title: 'Embed 3' + position: 3 + display_options: + display_extenders: { } filters: - id: - id: id - table: entity_test_mul_property_data - field: id - relationship: reverse__entity_test_mul__dynamic_references + dynamic_references_target_type: + id: dynamic_references_target_type + table: entity_test_mul_property_data__dynamic_references + field: dynamic_references_target_type + relationship: none group_type: group admin_label: '' operator: 'not empty' - value: - min: '' - max: '' - value: '' + value: '' group: 1 exposed: false expose: @@ -564,16 +506,77 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: entity_test_mul - entity_field: id - plugin_id: numeric + plugin_id: string + dynamic_references_target_type_1: + id: dynamic_references_target_type_1 + table: entity_test_mul_property_data__dynamic_references + field: dynamic_references_target_type + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: enity_test + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: string + defaults: + filters: false + filter_groups: false + relationships: false + fields: false filter_groups: operator: AND groups: 1: AND + relationships: + reverse__entity_test__dynamic_references: + id: reverse__entity_test__dynamic_references + table: entity_test_mul_property_data + field: reverse__entity_test__dynamic_references + entity_type: entity_test_mul + plugin_id: entity_reverse + fields: + id: + id: id + table: entity_test_mul_property_data + field: id + entity_type: entity_test_mul + entity_field: id + plugin_id: field + id_1: + id: id_1 + table: entity_test + field: id + entity_type: entity_test + entity_field: id + plugin_id: field + relationship: reverse__entity_test__dynamic_references cache_metadata: contexts: - - entity_test_view_grants - 'languages:language_content' - 'languages:language_interface' - url.query_args diff --git a/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml b/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_mul_entity_test_view.yml similarity index 56% copy from tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml copy to tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_mul_entity_test_view.yml index 3091161..a58ae07 100644 --- a/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_entity_test_view.yml +++ b/tests/modules/dynamic_entity_reference_entity_test/test_views/views.view.test_dynamic_entity_reference_mul_entity_test_view.yml @@ -1,11 +1,10 @@ -uuid: 829d017d-52d6-428e-8400-c15272aea3fc langcode: en status: true dependencies: module: - entity_test -id: test_dynamic_entity_reference_entity_test_view -label: test_dynamic_entity_reference_entity_test_view +id: test_dynamic_entity_reference_mul_entity_test_view +label: test_dynamic_entity_reference_mul_entity_test_view module: views description: '' tag: '' @@ -83,6 +82,65 @@ display: id: id table: entity_test field: id + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: + thousand_separator: '' + prefix_suffix: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false entity_type: entity_test entity_field: id plugin_id: field @@ -153,18 +211,15 @@ display: entity_field: id plugin_id: field filters: - dynamic_references__target_id: - id: dynamic_references__target_id - table: entity_test - field: dynamic_references__target_id - relationship: reverse__entity_test__dynamic_references + dynamic_references_target_type: + id: dynamic_references_target_type + table: entity_test__dynamic_references + field: dynamic_references_target_type + relationship: none group_type: group admin_label: '' operator: 'not empty' - value: - min: '' - max: '' - value: '' + value: '' group: 1 exposed: false expose: @@ -191,21 +246,48 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: entity_test - entity_field: dynamic_references - plugin_id: numeric - sorts: - id: - id: id - table: entity_test - field: id + plugin_id: string + dynamic_references_target_type_1: + id: dynamic_references_target_type_1 + table: entity_test__dynamic_references + field: dynamic_references_target_type relationship: none group_type: group admin_label: '' - order: ASC + operator: '=' + value: entity_test + group: 1 exposed: false expose: + operator_id: '' label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: string + sorts: + id: + id: id + table: entity_test + field: id entity_type: entity_test entity_field: id plugin_id: standard @@ -215,20 +297,11 @@ display: relationships: entity_test__dynamic_references: id: entity_test__dynamic_references - table: entity_test + table: entity_test__dynamic_references field: entity_test__dynamic_references - relationship: none - group_type: group - admin_label: 'References: Test entity' - required: false - entity_type: entity_test plugin_id: standard arguments: { } display_extenders: { } - filter_groups: - operator: AND - groups: - 1: AND cache_metadata: contexts: - entity_test_view_grants @@ -243,80 +316,96 @@ display: position: 1 display_options: display_extenders: { } - relationships: - entity_test_mul__dynamic_references: - id: entity_test_mul__dynamic_references - table: entity_test - field: entity_test_mul__dynamic_references - relationship: none - group_type: group - admin_label: 'References: Test entity - data table' - required: false - entity_type: entity_test - plugin_id: standard - defaults: - relationships: false - fields: false fields: id: id: id table: entity_test field: id + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: + thousand_separator: '' + prefix_suffix: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false entity_type: entity_test entity_field: id plugin_id: field - id_1: - id: id_1 - table: entity_test_mul + id_2: + id: id_2 + table: entity_test_mul_property_data field: id entity_type: entity_test_mul entity_field: id plugin_id: field relationship: entity_test_mul__dynamic_references - cache_metadata: - contexts: - - entity_test_view_grants - - 'languages:language_content' - - 'languages:language_interface' - - url.query_args - cacheable: false - embed_2: - display_plugin: embed - id: embed_2 - display_title: 'Embed 2' - position: 3 - display_options: - display_extenders: { } - display_description: '' - relationships: - reverse__entity_test__dynamic_references: - id: reverse__entity_test__dynamic_references - table: entity_test - field: reverse__entity_test__dynamic_references - relationship: none - group_type: group - admin_label: 'Reverse reference to References base field on Test entity' - required: false - entity_type: entity_test - plugin_id: standard defaults: - relationships: false + fields: false filters: false filter_groups: false - fields: false + relationships: false filters: - dynamic_references__target_id: - id: dynamic_references__target_id - table: entity_test - field: dynamic_references__target_id - relationship: reverse__entity_test__dynamic_references + dynamic_references_target_type: + id: dynamic_references_target_type + table: entity_test__dynamic_references + field: dynamic_references_target_type + relationship: none group_type: group admin_label: '' operator: 'not empty' - value: - min: '' - max: '' - value: '' + value: '' group: 1 exposed: false expose: @@ -343,18 +432,131 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: entity_test - entity_field: dynamic_references - plugin_id: numeric + plugin_id: string + dynamic_references_target_type_1: + id: dynamic_references_target_type_1 + table: entity_test__dynamic_references + field: dynamic_references_target_type + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: entity_test_mul + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: string filter_groups: operator: AND groups: 1: AND + relationships: + entity_test_mul__dynamic_references: + id: entity_test_mul__dynamic_references + table: entity_test__dynamic_references + field: entity_test_mul__dynamic_references + plugin_id: standard + cache_metadata: + contexts: + - entity_test_view_grants + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + cacheable: false + embed_2: + display_plugin: embed + id: embed_2 + display_title: 'Embed 2' + position: 2 + display_options: + display_extenders: { } fields: id: id: id table: entity_test field: id + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: + thousand_separator: '' + prefix_suffix: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false entity_type: entity_test entity_field: id plugin_id: field @@ -424,6 +626,16 @@ display: entity_type: entity_test entity_field: id plugin_id: field + defaults: + fields: false + relationships: false + relationships: + reverse__entity_test__dynamic_references: + id: reverse__entity_test__dynamic_references + table: entity_test + field: reverse__entity_test__dynamic_references + entity_type: entity_test + plugin_id: entity_reverse cache_metadata: contexts: - entity_test_view_grants @@ -438,30 +650,76 @@ display: position: 3 display_options: display_extenders: { } - display_description: '' - relationships: - reverse__entity_test_mul__dynamic_references: - id: reverse__entity_test_mul__dynamic_references - table: entity_test - field: reverse__entity_test_mul__dynamic_references - entity_type: entity_test - plugin_id: standard - defaults: - relationships: false - filters: false - filter_groups: false - fields: false fields: id: id: id table: entity_test field: id + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: + thousand_separator: '' + prefix_suffix: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false entity_type: entity_test entity_field: id plugin_id: field id_1: id: id_1 - table: entity_test_mul + table: entity_test_mul_property_data field: id relationship: reverse__entity_test_mul__dynamic_references group_type: group @@ -525,19 +783,21 @@ display: entity_type: entity_test_mul entity_field: id plugin_id: field + defaults: + fields: false + filters: false + filter_groups: false + relationships: false filters: - id: - id: id - table: entity_test_mul_property_data - field: id - relationship: reverse__entity_test_mul__dynamic_references + dynamic_references_target_type: + id: dynamic_references_target_type + table: entity_test__dynamic_references + field: dynamic_references_target_type + relationship: none group_type: group admin_label: '' operator: 'not empty' - value: - min: '' - max: '' - value: '' + value: '' group: 1 exposed: false expose: @@ -564,13 +824,55 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: entity_test_mul - entity_field: id - plugin_id: numeric + plugin_id: string + dynamic_references_target_type_1: + id: dynamic_references_target_type_1 + table: entity_test__dynamic_references + field: dynamic_references_target_type + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: entity_test_mul + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: string filter_groups: operator: AND groups: 1: AND + relationships: + reverse__entity_test_mul__dynamic_references: + id: reverse__entity_test_mul__dynamic_references + table: entity_test + field: reverse__entity_test_mul__dynamic_references + entity_type: entity_test + plugin_id: entity_reverse + display_description: '' cache_metadata: contexts: - entity_test_view_grants