/** Add a denomination * @access public * @return void */ public function adddenominationAction() { $form = new DenominationForm(); $form->submit->setLabel('Add a new denomination to the system...'); $this->view->form = $form; if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $denominations = new Denominations(); $insert = $denominations->add($form->getValues()); $this->getFlash()->addMessage('A new denomination has been created on the system!'); $this->redirect($this->_redirectUrl . 'denominations/period/' . $insert); } else { $this->getFlash()->addMessage($this->_formErrors); $form->populate($this->_request->getPost()); } } }