You are here

function hook_field_collection_item_delete in Field collection 7

Responds to field collection item deletion.

This hook is invoked after the field collection item has been removed from the database.

Parameters

FieldCollectionItemEntity $field_collection_item: The field collection item that is being deleted.

See also

hook_entity_delete()

File

./field_collection.api.php, line 110
Contains API documentation and examples for the Field Collection.

Code

function hook_field_collection_item_delete(FieldCollectionItemEntity $field_collection_item) {
  db_delete('mytable')
    ->condition('pid', entity_id('field_collection_item', $field_collection_item))
    ->execute();
}