You are here

function entity_test_entity_insert in Entity API 7

Implements hook_entity_insert().

File

tests/entity_test.module, line 183
Test module for the entity API.

Code

function entity_test_entity_insert($entity, $entity_type) {
  if ($entity_type == 'entity_test_type') {
    $_SESSION['entity_hook_test']['entity_insert'][] = entity_id($entity_type, $entity);
  }
}