/** Add a new mint * @access public * @return void */ public function addmintAction() { $form = new MintForm(); $form->submit->setLabel('Add a new mint to the system...'); $form->valid->setValue(1); $this->view->form = $form; if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if ($form->isValid($formData)) { $mints = new Mints(); $mints->add($form->getValues()); $this->redirect($this->_redirectUrl . 'mints'); $this->getFlash()->addMessage('A new mint has been created on the system!'); } else { $this->getFlash()->addMessage($this->_formErrors); $form->populate($this->_request->getPost()); } } }