diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUpdate.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUpdate.php deleted file mode 100644 index 6d72f7a..0000000 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestUpdate.php +++ /dev/null @@ -1,51 +0,0 @@ -get('entity_test_update.additional_base_field_definitions', []); - return $fields; - } - - /** - * {@inheritdoc} - */ - public static function bundleFieldDefinitions(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { - $fields = parent::bundleFieldDefinitions($entity_type, $bundle, $base_field_definitions); - $fields += \Drupal::state()->get('entity_test_update.additional_bundle_field_definitions.' . $bundle, []); - return $fields; - } - -} diff --git a/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php b/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php index 0de2460..e2bec61 100644 --- a/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php +++ b/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php @@ -57,12 +57,14 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setLabel(new TranslatableMarkup('ID')) ->setDescription(new TranslatableMarkup('The ID of the test entity.')) ->setReadOnly(TRUE) + ->setStorageRequired(TRUE) ->setSetting('unsigned', TRUE); $fields[$entity_type->getKey('uuid')] = BaseFieldDefinition::create('uuid') ->setLabel(new TranslatableMarkup('UUID')) ->setDescription(new TranslatableMarkup('The UUID of the test entity.')) - ->setReadOnly(TRUE); + ->setReadOnly(TRUE) + ->setStorageRequired(TRUE); $fields[$entity_type->getKey('bundle')] = BaseFieldDefinition::create('string') ->setLabel(new TranslatableMarkup('Type')) @@ -77,7 +79,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { } $fields[$entity_type->getKey('langcode')] = BaseFieldDefinition::create('language') - ->setLabel(new TranslatableMarkup('Language')); + ->setLabel(new TranslatableMarkup('Language')) + ->setStorageRequired(TRUE); if ($entity_type->isRevisionable()) { $fields[$entity_type->getKey('langcode')]->setRevisionable(TRUE); }