From c8659444458d822e6c36147ba9e6ad4ff9c943c3 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Thu, 17 May 2018 10:54:51 +0100 Subject: [PATCH] Issue #2971853 by q__nt_n, Sam152: Clean up superfluous use of "additional_base_field_definitions" in the entity_test module --- .../tests/modules/entity_test/src/Entity/EntityTestMul.php | 2 +- .../tests/modules/entity_test/src/Entity/EntityTestMulRev.php | 2 +- .../tests/modules/entity_test/src/Entity/EntityTestRev.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php index 50ae3771a77d..0c1ca9a533b0 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php @@ -50,7 +50,7 @@ class EntityTestMul extends EntityTest { * {@inheritdoc} */ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { - return parent::baseFieldDefinitions($entity_type) + \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []); + return parent::baseFieldDefinitions($entity_type); } } diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php index b4493e31f885..eeafa14d158b 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php @@ -54,7 +54,7 @@ class EntityTestMulRev extends EntityTestRev { * {@inheritdoc} */ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { - $fields = parent::baseFieldDefinitions($entity_type) + \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []); + $fields = parent::baseFieldDefinitions($entity_type); $fields['non_mul_field'] = BaseFieldDefinition::create('string') ->setLabel(t('Non translatable')) diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php index 6fd4904a3094..e99505eed347 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php @@ -67,7 +67,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setCardinality(1) ->setReadOnly(TRUE); - return $fields + \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []); + return $fields; } } -- GitLab