You are here

function hook_field_collection_item_presave in Field collection 7

Acts on a field collection item being inserted or updated.

This hook is invoked before the field collection item is saved to the database.

Parameters

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

See also

hook_entity_presave()

File

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

Code

function hook_field_collection_item_presave(FieldCollectionItemEntity $field_collection_item) {
  $field_collection_item->name = 'foo';
}