You are here

function hook_field_collection_item_update in Field collection 7

Responds to a field collection item being updated.

This hook is invoked after the field collection item has been updated in the database.

Parameters

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

See also

hook_entity_update()

File

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

Code

function hook_field_collection_item_update(FieldCollectionItemEntity $field_collection_item) {
  db_update('mytable')
    ->fields(array(
    'extra' => print_r($field_collection_item, TRUE),
  ))
    ->condition('id', entity_id('field_collection_item', $field_collection_item))
    ->execute();
}