function file_field_delete

Implements hook_field_delete().

1 call to file_field_delete()
image_field_delete in modules/image/image.field.inc
Implements hook_field_delete().

File

modules/file/file.field.inc, line 312

Code

function file_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items) {
    list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
    // Delete all file usages within this entity.
    foreach ($items as $delta => $item) {
        file_field_delete_file($item, $field, $entity_type, $id, 0);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.