function entity_test_entity_test_type_update in Entity API 7
Implements hook_entity_test_type_update().
File
- tests/
entity_test.module, line 215 - Test module for the entity API.
Code
function entity_test_entity_test_type_update($entity) {
$_SESSION['entity_hook_test']['entity_test_type_update'][] = $entity
->identifier();
// Determine changes on update.
if (!empty($entity->original) && $entity->original->label == 'test_changes') {
if ($entity->original->label != $entity->label) {
$entity->label .= '_update';
}
}
}