public function FieldDefinitionListener::onFieldDefinitionUpdate in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/FieldDefinitionListener.php \Drupal\Core\Field\FieldDefinitionListener::onFieldDefinitionUpdate()
Reacts to the update of a field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition being updated.
\Drupal\Core\Field\FieldDefinitionInterface $original: The original field definition; i.e., the definition before the update.
Overrides FieldDefinitionListenerInterface::onFieldDefinitionUpdate
File
- core/
lib/ Drupal/ Core/ Field/ FieldDefinitionListener.php, line 113 - Contains \Drupal\Core\Field\FieldDefinitionListener.
Class
- FieldDefinitionListener
- Reacts to field definition CRUD on behalf of the Entity system.
Namespace
Drupal\Core\FieldCode
public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original) {
// Notify the storage about the updated field.
$this->entityTypeManager
->getStorage($field_definition
->getTargetEntityTypeId())
->onFieldDefinitionUpdate($field_definition, $original);
}