You are here

function hook_post_action_example_entity_postinsert in Hook Post Action 7

Same name and namespace in other branches
  1. 8 hook_post_action_example/hook_post_action_example.module \hook_post_action_example_entity_postinsert()

Gets called after an entity has been inserted to database.

Parameters

$entity: An entity object

string $entity: An string containing entity type name

See also

hook_entity_postsave()

hook_entity_postinsert()

hook_entity_postupdate()

hook_entity_postdelete()

File

hook_post_action_example/hook_post_action_example.module, line 35

Code

function hook_post_action_example_entity_postinsert($entity, $entity_type) {
  list($id) = entity_extract_ids($entity_type, $entity);
  watchdog('hook_post_action_test', "The inserted entity {$entity_type} id is {$id} from " . __FUNCTION__);
}