function EntityTestMulRev::baseFieldDefinitions

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php \Drupal\entity_test\Entity\EntityTestMulRev::baseFieldDefinitions()
  2. 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php \Drupal\entity_test\Entity\EntityTestMulRev::baseFieldDefinitions()
  3. 11.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php \Drupal\entity_test\Entity\EntityTestMulRev::baseFieldDefinitions()

Overrides EntityTestRev::baseFieldDefinitions

4 calls to EntityTestMulRev::baseFieldDefinitions()
EntityTestMulRevPub::baseFieldDefinitions in core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php
EntityTranslationTest::testFieldDefinitions in core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php
Check that field translatability is handled properly.
EntityViewsDataTest::testRevisionTableFields in core/modules/views/tests/src/Unit/EntityViewsDataTest.php
Tests fields on the revision table.
entity_schema_test_entity_base_field_info in core/modules/system/tests/modules/entity_schema_test/entity_schema_test.module
Implements hook_entity_base_field_info().
1 method overrides EntityTestMulRev::baseFieldDefinitions()
EntityTestMulRevPub::baseFieldDefinitions in core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php, line 55

Class

EntityTestMulRev
Defines the test entity class.

Namespace

Drupal\entity_test\Entity

Code

public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
    $fields = parent::baseFieldDefinitions($entity_type);
    $fields['non_mul_field'] = BaseFieldDefinition::create('string')->setLabel(t('Non translatable'))
        ->setDescription(t('A non-translatable string field'))
        ->setRevisionable(TRUE);
    return $fields;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.