Beispiel #1
0
 /**
  *
  * @return array
  */
 public function createAction()
 {
     if ($this->getRequest()->isPost()) {
         $params = $this->getRequest()->getParams();
         try {
             $this->getIncotermCatalog()->beginTransaction();
             $incoterm = IncotermFactory::createFromArray($params);
             $this->getIncotermCatalog()->create($incoterm);
             $this->getIncotermCatalog()->commit();
             $this->setFlash('ok', $this->i18n->_("Se ha guardado correctamente el "));
         } catch (Exception $e) {
             $this->getIncotermCatalog()->rollBack();
             $this->setFlash('error', $this->i18n->_($e->getMessage()));
         }
     }
     $this->_redirect('incoterm/list');
 }
Beispiel #2
0
 /**
  *
  * makeBean
  * @param array $resultset
  * @return \Application\Model\Bean\Incoterm
  */
 protected function makeBean($resultset)
 {
     return IncotermFactory::createFromArray($resultset);
 }