public function FieldConfigBase::postCreate in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::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 Entity::postCreate
1 call to FieldConfigBase::postCreate()
- FieldConfig::postCreate in core/
modules/ field/ src/ Entity/ FieldConfig.php - Acts on a created entity before hooks are invoked.
1 method overrides FieldConfigBase::postCreate()
- FieldConfig::postCreate in core/
modules/ field/ src/ Entity/ FieldConfig.php - Acts on a created entity before hooks are invoked.
File
- core/
lib/ Drupal/ Core/ Field/ FieldConfigBase.php, line 267 - Contains \Drupal\Core\Field\FieldConfigBase.
Class
- FieldConfigBase
- Base class for configurable field definitions.
Namespace
Drupal\Core\FieldCode
public function postCreate(EntityStorageInterface $storage) {
parent::postCreate($storage);
// If it was not present in the $values passed to create(), (e.g. for
// programmatic creation), populate the denormalized field_type property
// from the field storage, so that it gets saved in the config record.
if (empty($this->field_type)) {
$this->field_type = $this
->getFieldStorageDefinition()
->getType();
}
}