function EntityTestFieldOverride::baseFieldDefinitions

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

Overrides EntityTest::baseFieldDefinitions

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldOverride.php, line 26

Class

EntityTestFieldOverride
Defines a test entity class for testing default values.

Namespace

Drupal\entity_test\Entity

Code

public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
    $fields = parent::baseFieldDefinitions($entity_type);
    $fields['name']->setDescription('The default description.');
    return $fields;
}

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