src/wcmf/lib/presentation/Controller.php
protected function endTransaction($commit) {
    $tx = $this->getPersistenceFacade()->getTransaction();
    if ($this->startedTransaction && $tx->isActive()) {
      if ($commit) {
        $tx->commit();
      }
      else {
        $tx->rollback();
      }
    }
    $this->startedTransaction = false;
  }
protected function endTransaction($commit) {
    $tx = $this->getPersistenceFacade()->getTransaction();
    if ($this->startedTransaction && $tx->isActive()) {
      if ($commit) {
        $tx->commit();
      }
      else {
        $tx->rollback();
      }
    }
    $this->startedTransaction = false;
  }
protected function endTransaction ( $ commit ) { $ tx = $ this -> getPersistenceFacade ( ) -> getTransaction ( ) ; if ( $ this -> startedTransaction && $ tx -> isActive ( ) ) { if ( $ commit ) { $ tx -> commit ( ) ; } else { $ tx -> rollback ( ) ; } } $ this -> startedTransaction = false ; }
End the transaction. Only if this controller instance started the transaction,
it will be committed or rolled back. Otherwise the call will be ignored.
@param $commit Boolean whether the transaction should be committed
End the transaction . Only if this controller instance started the transaction it will be committed or rolled back . Otherwise the call will be ignored .