public function BatTypeController::save in Booking and Availability Management Tools for Drupal 7
Implements EntityAPIControllerInterface.
Parameters
$transaction: Optionally a DatabaseTransaction object to use. Allows overrides to pass in their transaction object.
Overrides EntityAPIController::save
File
- modules/
bat_unit/ bat_unit.module, line 2091
Class
- BatTypeController
- The Controller for BatType entities.
Code
public function save($entity, DatabaseTransaction $transaction = NULL) {
global $user;
$entity->revision_uid = $user->uid;
$entity->revision_timestamp = REQUEST_TIME;
if (!isset($entity->log)) {
$entity->log = '';
}
bat_type_revisioning_event('pre update', $entity);
parent::save($entity);
$entity->revision = FALSE;
bat_type_revisioning_event('post update', $entity);
}