Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Field/FieldDefinitionListener.php \Drupal\Core\Field\FieldDefinitionListener::onFieldDefinitionUpdate()
  2. 9 core/lib/Drupal/Core/Field/FieldDefinitionListener.php \Drupal\Core\Field\FieldDefinitionListener::onFieldDefinitionUpdate()

File

core/lib/Drupal/Core/Field/FieldDefinitionListener.php, line 108

Class

FieldDefinitionListener
Reacts to field definition CRUD on behalf of the Entity system.

Namespace

Drupal\Core\Field

Code

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);
}