public function addassignmentAction() { $logic = new Logic_Branch(); $form = new Logic_Branch_Form_MpkAssignment(); if ($this->getRequest()->isPost()) { if ($form->isCancelled($this->getRequest()->getPost())) { $this->_helper->redirector('listassignment'); return; } if ($form->isValid($this->getRequest()->getPost())) { try { $logic->createBranchMpkAssignment($form); $this->_helper->messenger->success(); $this->_helper->redirector('listassignment'); return; } catch (Logic_Branch_Exception $e) { $this->_helper->messenger->error($e->getMessage()); } } } $this->view->form = $form; }