/** * @return void */ public function addAction() { $form = new Logic_Ws_Client_Form_Generic(); if ($this->getRequest()->isPost()) { if ($form->isCancelled($this->getRequest()->getPost())) { $this->_helper->redirector('index', null, null); return; } elseif ($form->isValid($this->getRequest()->getPost())) { try { $this->_model->createClient($form->getValues()); $this->_helper->messenger->success(); $this->_helper->redirector('index'); return; } catch (Logic_Ws_Exception $e) { $this->_helper->messenger->error(); } } } $this->view->form = $form; }