function file_field_delete

cis7 file.field.inc file_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items)
cle7 file.field.inc file_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items)
elmsmedia7 file.field.inc file_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items)
icor7 file.field.inc file_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items)
meedjum_blog7 file.field.inc file_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items)
mooc7 file.field.inc file_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items)

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 305
Field module functionality for the File module.

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);
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.