Perform actions on field collection insert or update I have created field collection and added it to my content type. I have created a node, and now user can add field collections on this node. But i need to write into a file(some stuff) when user added new field collection or updated it. I need something like hook_node_insert and hook_node_update, i cant find anything for field collection.

In preprocess_node i have outputed field_collection_field and its returns only ids, and i can get them only by this code:

 $field_ids = array();
            //context_node = my current node,
            //field_block_id == field collection field
            foreach ($context_node-&gt;field_block_id['und'] as $element) {
                $field_ids[] = $element['value'];
            }
 $field_collection = entity_load('field_collection_item', $field_ids);
A Field Collection Item is an entity, so the equivalents of the node hooks are hook_entity_insert()


  Act on entities when inserted.


And hook_entity_update()


  Act on entities when updated.