You are here

public function MerciDefaultEntityController::resetCache in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3

Implements DrupalEntityControllerInterface::resetCache().

Overrides DrupalDefaultEntityController::resetCache

1 call to MerciDefaultEntityController::resetCache()
MerciDefaultEntityController::delete in merci_line_item/includes/merci_line_item.controller.inc
Delete permanently saved entities.

File

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

Class

MerciDefaultEntityController
@file Provides a central controller for Drupal Commerce.

Code

public function resetCache(array $ids = NULL) {
  parent::resetCache($ids);

  // Maintain the list of locked entities, so that the releaseLock() method
  // can know when it's time to commit the transaction.
  if (!empty($this->lockedEntities)) {
    if (isset($ids)) {
      foreach ($ids as $id) {
        unset($this->lockedEntities[$id]);
      }
    }
    else {
      $this->lockedEntities = array();
    }
  }

  // Try to release the lock, if possible.
  $this
    ->releaseLock();
}