FieldStorageDefinitionListenerInterface.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php
  2. 8.9.x core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php
  3. 11.x core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php

Namespace

Drupal\Core\Field

File

core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php

View source
<?php

namespace Drupal\Core\Field;


/**
 * Defines an interface for reacting to field storage definition creation, deletion, and updates.
 */
interface FieldStorageDefinitionListenerInterface {
    
    /**
     * Reacts to the creation of a field storage definition.
     *
     * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
     *   The definition being created.
     */
    public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition);
    
    /**
     * Reacts to the update of a field storage definition.
     *
     * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
     *   The field being updated.
     * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $original
     *   The original storage definition; i.e., the definition before the update.
     *
     * @throws \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException
     *   Thrown when the update to the field is forbidden.
     */
    public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original);
    
    /**
     * Reacts to the deletion of a field storage definition.
     *
     * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
     *   The field being deleted.
     */
    public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition);

}

Interfaces

Title Deprecated Summary
FieldStorageDefinitionListenerInterface Defines an interface for reacting to field storage definition creation, deletion, and updates.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.