hook_entity_revision_delete(Drupal\Core\Entity\EntityInterface $entity)
Respond to entity revision deletion.
This hook runs once the entity revision has been deleted from the storage.
\Drupal\Core\Entity\EntityInterface $entity: The entity object for the entity revision that has been deleted.
hook_ENTITY_TYPE_revision_delete()
function hook_entity_revision_delete(Drupal\Core\Entity\EntityInterface $entity) { $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); foreach ($referenced_files_by_field as $field => $uuids) { _editor_delete_file_usage($uuids, $entity, 1); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!entity.api.php/function/hook_entity_revision_delete/8.1.x