예제 #1
0
 /**
  * @access 	public
  * @return 	void
  */
 public function savePlanningAction()
 {
     $form = new Fefop_Form_FundPlanning();
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($this->getRequest()->getPost())) {
             $this->_mapper->setData($form->getValues());
             $return = $this->_mapper->savePlanning();
             $message = $this->_mapper->getMessage()->toArray();
             $result = array('status' => (bool) $return, 'id' => $return, 'description' => $message, 'data' => $form->getValues(), 'fields' => $this->_mapper->getFieldsError());
         } else {
             $message = new App_Message();
             $message->addMessage($this->_config->messages->warning, App_Message::WARNING);
             $result = array('status' => false, 'description' => $message->toArray(), 'errors' => $form->getMessages());
         }
     }
     $this->_helper->json($result);
 }