/** * save() * @param integer $intElementId * @param string $strType * @param string $strElementId * @param integet $intVersion * @author Florian Mathis <*****@*****.**> * @version 1.0 */ public function save($intElementId, $strType, $strElementId = null, $intVersion = null) { try { $this->core->logger->debug('application->plugins->Gmaps->data->helpers->Plugin_DataHelperGmaps->save(' . $intElementId . ', ' . $strType . ', ' . $strElementId . ', ' . $intVersion . ')'); $this->strType = $strType; $this->getModel(); $strGmapsLatitude = ''; if (array_key_exists($this->objElement->name . 'Latitude', $_POST)) { $strGmapsLatitude = $_POST[$this->objElement->name . 'Latitude']; } $strGmapsLongitude = ''; if (array_key_exists($this->objElement->name . 'Longitude', $_POST)) { $strGmapsLongitude = $_POST[$this->objElement->name . 'Longitude']; } if ($strGmapsLongitude != '' && $strGmapsLatitude != '') { $arrValues = array('longitude' => $strGmapsLongitude, 'latitude' => $strGmapsLatitude); //$this->objModel->addGmaps($intElementId, $strGmapsLongitude, $strGmapsLatitude); $this->objModel->addPlugin($intElementId, $arrValues, 'Gmaps'); $this->load($intElementId, $strType, $strElementId, $intVersion); } else { //$this->objModel->removeGmaps($intElementId); } } catch (Exception $exc) { $this->core->logger->err($exc); } }