public function addgroupAction() { $logic = new Logic_Branch(); $form = new Logic_Branch_Group_Form_Generic(); if ($this->getRequest()->isPost()) { if ($form->isCancelled($this->getRequest()->getPost())) { $this->_helper->redirector('listgroups'); return; } if ($form->isValid($this->getRequest()->getPost())) { try { $logic->createBranchGroup($form); $this->_helper->messenger->success(); $this->_helper->redirector('listgroups'); return; } catch (Logic_Branch_Exception $e) { $this->_helper->messenger->error(); } } } $this->view->form = $form; }