You are here

function field_collection_field_delete_revision in Field collection 7

Implements hook_field_delete_revision().

File

./field_collection.module, line 751
Module implementing field collection field type.

Code

function field_collection_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {
  foreach ($items as $item) {
    if (!empty($item['revision_id']) && ($entity = field_collection_item_revision_load($item['revision_id']))) {
      $entity
        ->deleteRevision(TRUE);
    }
  }
}