public function FieldConfig::postCreate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::postCreate()
Acts on an entity after it is created but before hooks are invoked.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
Overrides FieldConfigBase::postCreate
File
- core/
modules/ field/ src/ Entity/ FieldConfig.php, line 126 - Contains \Drupal\field\Entity\FieldConfig.
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();
}
}