editor_entity_delete

editor_entity_delete(EntityInterface $entity)

Implements hook_entity_delete().

File

core/modules/editor/editor.module, line 401
Adds bindings for client-side "text editors" to text formats.

Code

function editor_entity_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, 0);
  }
}
doc_Drupal
2016-10-29 09:03:54
Comments
Leave a Comment

Please login to continue.