FieldStorageConfig::postDelete

public static FieldStorageConfig::postDelete(EntityStorageInterface $storage, array $fields)

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 426

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;
}
doc_Drupal
2016-10-29 09:12:23
Comments
Leave a Comment

Please login to continue.