Example #1
0
 /**
  * Parse the data into the template
  */
 private function parse()
 {
     // show message
     $this->tpl->assign('locationItems', FrontendLocationModel::getAll());
     // hide form
     $this->tpl->assign('locationSettings', FrontendModel::getModuleSettings('location'));
 }
Example #2
0
 /**
  * Load the data
  */
 protected function loadData()
 {
     $this->items = FrontendLocationModel::getAll();
     $this->settings = FrontendLocationModel::getMapSettings(0);
     $firstMarker = current($this->items);
     if (empty($this->settings)) {
         $this->settings = FrontendModel::getModuleSettings('location');
         $this->settings['center']['lat'] = $firstMarker['lat'];
         $this->settings['center']['lng'] = $firstMarker['lng'];
     }
     // no center point given yet, use the first occurance
     if (!isset($this->settings['center'])) {
         $this->settings['center']['lat'] = $firstMarker['lat'];
         $this->settings['center']['lng'] = $firstMarker['lng'];
     }
 }