function EntityTestConstraints::baseFieldDefinitions
Same name in other branches
- 8.9.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraints.php \Drupal\entity_test\Entity\EntityTestConstraints::baseFieldDefinitions()
- 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraints.php \Drupal\entity_test\Entity\EntityTestConstraints::baseFieldDefinitions()
- 11.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraints.php \Drupal\entity_test\Entity\EntityTestConstraints::baseFieldDefinitions()
Overrides EntityTest::baseFieldDefinitions
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTestConstraints.php, line 36
Class
- EntityTestConstraints
- Defines a test class for testing the definition of entity level constraints.
Namespace
Drupal\entity_test\EntityCode
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields = parent::baseFieldDefinitions($entity_type);
$fields['changed'] = BaseFieldDefinition::create('changed')->setLabel(t('Changed'));
return $fields;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.