X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fmodules%2Fentity_test%2Fsrc%2FEntity%2FEntityTestMulRev.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fmodules%2Fentity_test%2Fsrc%2FEntity%2FEntityTestMulRev.php;h=b4493e31f885c7d6ac6d9f37a2b460bbab68b556;hp=f01675f60256dcec5ba9ebbfc694b5511dc60e8b;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php b/web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php index f01675f60..b4493e31f 100644 --- a/web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php +++ b/web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php @@ -2,6 +2,9 @@ namespace Drupal\entity_test\Entity; +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Field\BaseFieldDefinition; + /** * Defines the test entity class. * @@ -47,4 +50,18 @@ namespace Drupal\entity_test\Entity; */ 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['non_mul_field'] = BaseFieldDefinition::create('string') + ->setLabel(t('Non translatable')) + ->setDescription(t('A non-translatable string field')) + ->setRevisionable(TRUE); + + return $fields; + } + }