public static function EckEntityType::postDelete in Entity Construction Kit (ECK) 8
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 EntityBase::postDelete
File
- src/
Entity/ EckEntityType.php, line 187
Class
- EckEntityType
- Defines the ECK Entity Type config entities.
Namespace
Drupal\eck\EntityCode
public static function postDelete(EntityStorageInterface $storage, array $entities) {
parent::postDelete($storage, $entities);
$entity_update_manager = \Drupal::entityDefinitionUpdateManager();
foreach ($entities as $entity) {
$entity_type = $entity_update_manager
->getEntityType($entity
->id());
$entity_update_manager
->uninstallEntityType($entity_type);
}
}