示例#1
0
 public function editAction()
 {
     parent::editAction();
     if ($this->getRequest()->isPost()) {
         try {
             $data = (object) $this->getRequest()->getPost();
             $this->_setData($data);
             $this->_entity->save();
             $this->__goBack();
         } catch (Exception $e) {
             $this->view->showMessage($e);
         }
     } else {
         $this->__postContentFields();
         $_POST['city_location'] = array('lat' => $this->_entity->getLocationLat(), 'lng' => $this->_entity->getLocationLng(), 'zoom' => $this->_entity->getLocationZoom());
     }
 }