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).
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_entity_presave($entity, $type) {
$entity->changed = REQUEST_TIME;
}