function FieldConfig::postCreate
Same name in other branches
- 9 core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::postCreate()
- 8.9.x core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::postCreate()
- 10 core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::postCreate()
Overrides FieldConfigBase::postCreate
File
-
core/
modules/ field/ src/ Entity/ FieldConfig.php, line 148
Class
- FieldConfig
- Defines the Field entity.
Namespace
Drupal\field\EntityCode
public function postCreate(EntityStorageInterface $storage) {
parent::postCreate($storage);
// Validate that we have a valid storage for this field. This throws an
// exception if the storage is invalid.
$this->getFieldStorageDefinition();
// 'Label' defaults to the field name (mostly useful for fields created in
// tests).
if (empty($this->label)) {
$this->label = $this->getName();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.