/** Add a ruler * @access public * @return void */ public function addrulerAction() { $form = new RulerForm(); $form->submit->setLabel('Add a new ruler or issuer to the system...'); $this->view->form = $form; if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $rulers = new Rulers(); $rulers->add($form->getValues()); $this->redirect($this->_redirectUrl . 'rulers/' . $form->getValue('period')); $this->getFlash()->addMessage($form->getValue('issuer') . ' has been added to the system!'); } else { $this->getFlash()->addMessage($this->_formErrors); $form->populate($this->_request->getPost()); } } }