protected function loadTransaction($transactionId) { $transaction = $this->manager->fetch($this->transactionClassName, $transactionId); if (!$transaction instanceof Customweb_Payment_Entity_AbstractTransaction) { throw new Exception("Transaction must be of type Customweb_Payment_Entity_AbstractTransaction"); } return $transaction; }
/** * Deactivates the alias. It is not selected anymore by getAliasTransactions(). * * @param int $transactionId * @throws Exception */ public function deactivateAlias($transactionId) { $transaction = $this->manager->fetch($this->transactionClassName, $transactionId); if (!$transaction instanceof Customweb_Payment_Entity_AbstractTransaction) { throw new Exception("Transaction must be of type Customweb_Payment_Entity_AbstractTransaction"); } $transaction->setAliasActive(false); $this->manager->persist($transaction); }
public function onBeforeSave(Customweb_Database_Entity_IManager $entityManager) { if ($this->getContextId() !== null) { $currentContext = $entityManager->fetch(get_class($this), $this->getContextId()); $newMap = $this->context->applyUpdatesOnMap($currentContext->getMap()); $this->setStoreMap($newMap); } else { $this->setStoreMap($this->context->getMap()); } }