public function index($params) { if (!OW::getPluginManager()->isPluginActive('event')) { throw new Redirect404Exception(); } $lat = null; $lon = null; $hash = null; if (!empty($params['lat'])) { $lat = (double) $params['lat']; } if (!empty($params['lat'])) { $lat = (double) $params['lat']; } if (!empty($params['lng'])) { $lon = (double) $params['lng']; } if (!empty($params['hash'])) { $hash = $params['hash']; } $entityIdList = GOOGLELOCATION_BOL_LocationService::getInstance()->getEntityListFromSession($hash); $bridge = new GOOGLELOCATION_CLASS_EventBridge(); $listCmp = $bridge->getEventListCmp($entityIdList); $this->addComponent('cmp', $listCmp); $locationName = GOOGLELOCATION_BOL_LocationService::getInstance()->getLocationName($lat, $lon); $this->assign('locationName', $locationName); $language = OW::getLanguage(); $this->setPageHeading(OW::getLanguage()->text('googlelocation', 'browse_page_heading')); $this->setPageTitle(OW::getLanguage()->text('googlelocation', 'events_browse_page_title')); $this->setPageHeadingIconClass('ow_ic_bookmark'); $this->assign('backUrl', empty($_GET['backUri']) ? null : OW_URL_HOME . $_GET['backUri']); $this->setTemplate(OW::getPluginManager()->getPlugin('googlelocation')->getCtrlViewDir() . 'entity_list_index.html'); }
protected function getListCmp() { $bridge = new GOOGLELOCATION_CLASS_EventBridge(); $data = $bridge->getAvatarData(array_slice($this->IdList, 0, self::DISPLAY_COUNT)); $new = new GOOGLELOCATION_CMP_MiniAvatarList($data); switch (true) { case $this->count <= 8: $new->setCustomCssClass('ow_big_avatar'); break; default: //$new->setCustomCssClass(BASE_CMP_MiniAvatarUserList::CSS_CLASS_MINI_AVATAR); break; } return $new; }