You are here

protected function MerciDefaultEntityController::releaseLock in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3

Checks the list of tracked locked entities, and if it's empty, commits the transaction in order to remove the acquired locks.

The transaction is not necessarily committed immediately. Drupal will commit it as soon as possible given the state of the transaction stack.

2 calls to MerciDefaultEntityController::releaseLock()
MerciDefaultEntityController::resetCache in merci_line_item/includes/merci_line_item.controller.inc
Implements DrupalEntityControllerInterface::resetCache().
MerciDefaultEntityController::save in merci_line_item/includes/merci_line_item.controller.inc
Permanently saves the given entity.

File

merci_line_item/includes/merci_line_item.controller.inc, line 78
Provides a central controller for Drupal Commerce.

Class

MerciDefaultEntityController
@file Provides a central controller for Drupal Commerce.

Code

protected function releaseLock() {
  if (isset($this->entityInfo['locking mode']) && $this->entityInfo['locking mode'] == 'pessimistic') {
    if (empty($this->lockedEntities)) {
      unset($this->controllerTransaction);
    }
  }
}