You are here

public static function FieldStorageConfig::postDelete in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::postDelete()

Acts on deleted entities before the delete hook is invoked.

Used after the entities are deleted but before invoking the delete hook.

Parameters

\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.

\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.

Overrides Entity::postDelete

File

core/modules/field/src/Entity/FieldStorageConfig.php, line 430
Contains \Drupal\field\Entity\FieldStorageConfig.

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::entityManager()
        ->onFieldStorageDefinitionDelete($field);
      $field->deleted = TRUE;
    }
  }

  // Unset static flag.
  static::$inDeletion = FALSE;
}