3 namespace Drupal\Core\Field;
6 * Defines an interface for reacting to field storage definition creation, deletion, and updates.
8 interface FieldStorageDefinitionListenerInterface {
11 * Reacts to the creation of a field storage definition.
13 * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
14 * The definition being created.
16 public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition);
19 * Reacts to the update of a field storage definition.
21 * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
22 * The field being updated.
23 * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $original
24 * The original storage definition; i.e., the definition before the update.
26 * @throws \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException
27 * Thrown when the update to the field is forbidden.
29 public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original);
32 * Reacts to the deletion of a field storage definition.
34 * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
35 * The field being deleted.
37 public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition);