2 * Implements hook_entity_revision_delete().
4 function {{ machine_name }}_entity_revision_delete(Drupal\Core\Entity\EntityInterface $entity) {
5 $referenced_files_by_field = _editor_get_file_uuids_by_field($entity);
6 foreach ($referenced_files_by_field as $field => $uuids) {
7 _editor_delete_file_usage($uuids, $entity, 1);