예제 #1
0
 /**
  * @return void
  */
 public function editAction()
 {
     $request = $this->getRequest();
     $id = $this->_helper->IdConvert->hexToStr($request->getParam('id'));
     $form = new Logic_Ws_Sms_RecipientDeveloper_Form_Generic();
     if ($request->isPost()) {
         if ($form->isCancelled($this->getRequest()->getPost())) {
             $this->_helper->redirector('index', null, null);
             return;
         }
         if ($form->isValid($request->getPost())) {
             try {
                 $values = $form->getValues();
                 $this->_model->editRecipientDeveloper($id, $values);
                 $this->_helper->messenger->success();
                 $this->_helper->redirector('index');
                 return;
             } catch (Logic_Exception $e) {
                 $this->_helper->messenger->error();
             }
         }
     } else {
         $form->setDefaults($this->_model->getRecord($id));
     }
     $this->view->form = $form;
 }