| Versions | |
|---|---|
| 7 | hook_entity_presave($entity, $type) |
Act on an entity before it is about to be created or updated.
$entity The entity object.
$type The type of entity being saved (i.e. node, user, comment).
drupal/
<?php
function hook_entity_presave($entity, $type) {
$entity->changed = REQUEST_TIME;
}
?>