function EntityTestFieldMethods::baseFieldDefinitions
Same name in other branches
- 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldMethods.php \Drupal\entity_test\Entity\EntityTestFieldMethods::baseFieldDefinitions()
- 8.9.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldMethods.php \Drupal\entity_test\Entity\EntityTestFieldMethods::baseFieldDefinitions()
- 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldMethods.php \Drupal\entity_test\Entity\EntityTestFieldMethods::baseFieldDefinitions()
Overrides EntityTestMul::baseFieldDefinitions
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTestFieldMethods.php, line 46
Class
- EntityTestFieldMethods
- Defines the test entity class.
Namespace
Drupal\entity_test\EntityCode
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields = parent::baseFieldDefinitions($entity_type);
$fields['test_invocation_order'] = BaseFieldDefinition::create('auto_incrementing_test')->setLabel(t('Test field method invocation order.'))
->setTranslatable(TRUE);
return $fields;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.