function FieldStorageConfig::postDelete

Same name in other branches
  1. 9 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::postDelete()
  2. 8.9.x core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::postDelete()
  3. 11.x core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::postDelete()

Overrides EntityBase::postDelete

File

core/modules/field/src/Entity/FieldStorageConfig.php, line 461

Class

FieldStorageConfig
Defines the Field storage configuration entity.

Namespace

Drupal\field\Entity

Code

public static function postDelete(EntityStorageInterface $storage, array $fields) {
    // Notify the storage.
    foreach ($fields as $field) {
        if (!$field->deleted) {
            \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionDelete($field);
            $field->deleted = TRUE;
        }
    }
    // Unset static flag.
    static::$inDeletion = FALSE;
}

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