Ejemplo n.º 1
0
 /** Add a new help topic
  * @access public
  * @return void
  */
 public function addAction()
 {
     $form = new HelpForm();
     $form->submit->setLabel('Add new help topic to system');
     $form->author->setValue($this->getIdentityForForms());
     $this->view->form = $form;
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($this->_request->getPost())) {
             $this->_help->add($form->getValues());
             $this->getFlash()->addMessage('Help topic has been created!');
             $this->redirect('/admin/help');
         } else {
             $form->populate($form->getValues());
         }
     }
 }