function config_entity_revisions_entity_delete in Config Entity Revisions 8.2
Implements hook_entity_delete().
File
- ./
config_entity_revisions.module, line 77 - Config entity revisions procedural hooks.
Code
function config_entity_revisions_entity_delete(EntityInterface $entity) {
if (!$entity instanceof ConfigEntityRevisionsConfigEntityInterface) {
return;
}
$controller = ConfigEntityRevisionsRevisionStorageHandler::createInstance(\Drupal::getContainer(), $entity
->getContentEntity()
->getEntityType());
$controller
->deleteRevisions($entity);
}