/** Add a new coroner * @access public * @return void */ public function addAction() { $form = new CoronerForm(); $form->submit->setLabel('Add a new coroner'); $this->view->form = $form; if ($this->getRequest()->isPost()) { if ($form->isValid($this->_request->getPost())) { $this->_coroners->addCoroner($form->getValues()); $this->getFlash()->addMessage('Coroner details created!'); $this->redirect($this->_redirectUrl); } else { $form->populate($form->getValues()); } } }