function hook_ENTITY_TYPE_presave in Entity API 7
Act on an entity before it is about to be created or updated.
Parameters
$entity: The entity object.
See also
1 function implements hook_ENTITY_TYPE_presave()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- entity_test_entity_test_type_presave in tests/
entity_test.module - Implements hook_entity_test_type_presave().
File
- ./
entity.api.php, line 491 - Hooks provided by the entity API.
Code
function hook_ENTITY_TYPE_presave($entity) {
$entity->changed = REQUEST_TIME;
}