Same name and namespace in other branches
  1. 8.9.x core/modules/node/src/Entity/NodeType.php \Drupal\node\Entity\NodeType::postDelete()
  2. 9 core/modules/node/src/Entity/NodeType.php \Drupal\node\Entity\NodeType::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 ConfigEntityBundleBase::postDelete

File

core/modules/node/src/Entity/NodeType.php, line 205

Class

NodeType
Defines the Node type configuration entity.

Namespace

Drupal\node\Entity

Code

public static function postDelete(EntityStorageInterface $storage, array $entities) {
  parent::postDelete($storage, $entities);

  // Clear the node type cache to reflect the removal.
  $storage
    ->resetCache(array_keys($entities));
}