You are here

function video_field_delete in Video 7.2

Same name and namespace in other branches
  1. 7 video.field.inc \video_field_delete()

Implements hook_field_delete().

File

./video.field.inc, line 533
Implement a video field, based on the file module's file field.

Code

function video_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items) {

  // Deregister the thumbnails in file_usage
  $thumbnails = _video_field_get_all_thumbnails($field, $items);
  file_field_delete($entity_type, $entity, $field, $instance, $langcode, $thumbnails);

  // Deregister the converted files in file_usage
  $converted = _video_field_get_all_converted($items);
  file_field_delete($entity_type, $entity, $field, $instance, $langcode, $converted);
  file_field_delete($entity_type, $entity, $field, $instance, $langcode, $items);
}