/** * * @return array */ public function createAction() { if ($this->getRequest()->isPost()) { $params = $this->getRequest()->getParams(); try { $this->getCustomsTariffCodeCatalog()->beginTransaction(); $customsTariffCode = CustomsTariffCodeFactory::createFromArray($params); $this->getCustomsTariffCodeCatalog()->create($customsTariffCode); $this->getCustomsTariffCodeCatalog()->commit(); $this->setFlash('ok', $this->i18n->_("Se ha guardado correctamente la fraccion arancelaria ")); } catch (Exception $e) { $this->getCustomsTariffCodeCatalog()->rollBack(); $this->setFlash('error', $this->i18n->_($e->getMessage())); } } $this->_redirect('customs-tariff-code/list'); }
/** * * makeBean * @param array $resultset * @return \Application\Model\Bean\CustomsTariffCode */ protected function makeBean($resultset) { return CustomsTariffCodeFactory::createFromArray($resultset); }