function EntityTestMulChanged::baseFieldDefinitions

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

Overrides EntityTestMul::baseFieldDefinitions

1 call to EntityTestMulChanged::baseFieldDefinitions()
EntityTestMulRevChanged::baseFieldDefinitions in core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php
1 method overrides EntityTestMulChanged::baseFieldDefinitions()
EntityTestMulRevChanged::baseFieldDefinitions in core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php, line 54

Class

EntityTestMulChanged
Defines the test entity class.

Namespace

Drupal\entity_test\Entity

Code

public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
    $fields = parent::baseFieldDefinitions($entity_type);
    $fields['changed'] = BaseFieldDefinition::create('changed_test')->setLabel(t('Changed'))
        ->setDescription(t('The time that the entity was last edited.'))
        ->setTranslatable(TRUE);
    $fields['not_translatable'] = BaseFieldDefinition::create('string')->setLabel(t('Non translatable'))
        ->setDescription(t('A non-translatable string field'));
    return $fields;
}

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