function editor_entity_revision_delete
Same name in other branches
- 9 core/modules/editor/editor.module \editor_entity_revision_delete()
- 10 core/modules/editor/editor.module \editor_entity_revision_delete()
- 11.x core/modules/editor/editor.module \editor_entity_revision_delete()
Implements hook_entity_revision_delete().
File
-
core/
modules/ editor/ editor.module, line 433
Code
function editor_entity_revision_delete(EntityInterface $entity) {
// Only act on content entities.
if (!$entity instanceof FieldableEntityInterface) {
return;
}
$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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.