コード例 #1
0
 public function edittranslationAction()
 {
     $form = new Form_TranslateForm();
     $desc = new Model_DbTable_DestinationDescription();
     $id = $this->_getParam('id');
     $description = $desc->getDescriptionById($id, 2);
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if ($form->isValid($post)) {
             $data = array('name' => $post['Name'], 'description' => $post['Description'], 'updated_by' => $this->_userInfo->id, 'updated_at' => date('Y-m-d H:i:s'));
             $desc->updatePoiDescription($data, $id, 2);
             $this->loggingaction('Culture', 'Edit', $id, 2);
             $this->_flashMessenger->addMessage('Translation updated successfully');
         }
         $this->_helper->redirector('index');
     }
     $form->name->setValue($description['name']);
     $form->description->setValue($description['description']);
     $this->view->form = $form;
 }