public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-index'); $menuItem->setLabel($language->text('sponsors', 'admin_tab_general_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sponsors_admin')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-list'); $menuItem->setLabel($language->text('sponsors', 'admin_sponsors_list')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sponsors_admin_list')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-add'); $menuItem->setLabel($language->text('sponsors', 'admin_add_sponsor')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sponsors_admin_add')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(3); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; }
public function getMenu() { $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('all'); $menuItem->setPrefix('questions'); $menuItem->setLabel($language->text('equestions', 'list_all_tab')); $menuItem->setOrder(1); $menuItem->setUrl(OW::getRouter()->urlForRoute('equestions-all')); $menuItem->setIconClass('ow_ic_lens'); $menu->addElement($menuItem); if (OW::getUser()->isAuthenticated()) { if (OW::getPluginManager()->isPluginActive('friends')) { $menuItem = new BASE_MenuItem(); $menuItem->setKey('friends'); $menuItem->setPrefix('questions'); $menuItem->setLabel($language->text('equestions', 'list_friends_tab')); $menuItem->setOrder(2); $menuItem->setUrl(OW::getRouter()->urlForRoute('equestions-friends')); $menuItem->setIconClass('ow_ic_user'); $menu->addElement($menuItem); } $menuItem = new BASE_MenuItem(); $menuItem->setKey('my'); $menuItem->setPrefix('questions'); $menuItem->setLabel($language->text('equestions', 'list_my_tab')); $menuItem->setOrder(3); $menuItem->setUrl(OW::getRouter()->urlForRoute('equestions-my')); $menuItem->setIconClass('ow_ic_user'); $menu->addElement($menuItem); } return $menu; }
public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-index'); $menuItem->setLabel($language->text('advancedphoto', 'admin_tab_general_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('advancedphoto_admin_config')); $menuItem->setIconClass('ow_ic_files'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('categories'); $menuItem->setLabel($language->text('advancedphoto', 'admin_category_tab_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('advancedphoto_categories')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; $this->setPageHeading(OW::getLanguage()->text('advancedphoto', 'admin_settings_title')); $this->setPageTitle(OW::getLanguage()->text('advancedphoto', 'admin_settings_title')); $this->setPageHeadingIconClass('ow_ic_gear_wheel'); }
public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('steps'); $menuItem->setLabel($language->text('sitetour', 'admin_steps')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sitetour_admin')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('settings'); $menuItem->setLabel($language->text('sitetour', 'admin_settings')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sitetour_settings')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('console'); $menuItem->setLabel($language->text('sitetour', 'admin_console')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sitetour_console')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(3); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; }
/** * Constructor. */ public function __construct() { parent::__construct(); $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('index'); $menuItem->setLabel($language->text('ads', 'advertisement_menu_banner_list')); $menuItem->setUrl(OW::getRouter()->urlForRoute('ads.admin_index')); $menuItem->setIconClass('ow_ic_files'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('manage'); $menuItem->setLabel($language->text('ads', 'advertisement_menu_manage_banners')); $menuItem->setUrl(OW::getRouter()->urlForRoute('ads.admin_manage')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; $this->adsService = ADS_BOL_Service::getInstance(); $this->setPageTitle($language->text('ads', 'page_title_ads')); $this->setPageHeading($language->text('ads', 'page_heading_ads')); $this->setPageHeadingIconClass('ow_ic_star'); OW::getNavigation()->activateMenuItem('admin_plugins', 'admin', 'sidebar_menu_plugins_installed'); }
public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $config = OW::getConfig(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-index'); $menuItem->setLabel($language->text('eventx', 'admin_tab_general_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_index')); $menuItem->setIconClass('ow_ic_files'); $menuItem->setOrder(1); $menu->addElement($menuItem); if ($config->getValue('eventx', 'enableCategoryList') == '1') { $menuItem = new BASE_MenuItem(); $menuItem->setKey('categories'); $menuItem->setLabel($language->text('eventx', 'admin_category_tab_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_categories')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); } $menuItem = new BASE_MenuItem(); $menuItem->setKey('approval'); $menuItem->setLabel($language->text('eventx', 'admin_pending_approval')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_approval')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(3); $menu->addElement($menuItem); if ($config->getValue('eventx', 'enableCalendar') == '1') { $menuItem = new BASE_MenuItem(); $menuItem->setKey('calendar'); $menuItem->setLabel($language->text('eventx', 'admin_calendar_tab')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_calendar')); $menuItem->setIconClass('ow_ic_calendar'); $menuItem->setOrder(4); $menu->addElement($menuItem); } if (is_dir(OW_DIR_PLUGIN . 'event')) { $menuItem = new BASE_MenuItem(); $menuItem->setKey('import'); $menuItem->setLabel($language->text('eventx', 'admin_import_tab')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_import')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(5); $menu->addElement($menuItem); } $this->addComponent('menu', $menu); $this->menu = $menu; $this->setPageHeading(OW::getLanguage()->text('eventx', 'admin_settings_title')); $this->setPageTitle(OW::getLanguage()->text('eventx', 'admin_settings_title')); $this->setPageHeadingIconClass('ow_ic_gear_wheel'); }
public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-index'); $menuItem->setLabel($language->text('ivideo', 'admin_tab_general_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('ivideo_admin')); $menuItem->setIconClass('ow_ic_files'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('categories'); $menuItem->setLabel($language->text('ivideo', 'admin_category_tab_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('ivideo_categories')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('approval'); $menuItem->setLabel($language->text('ivideo', 'admin_pending_approval')); $menuItem->setUrl(OW::getRouter()->urlForRoute('ivideo_admin_approval')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(3); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; $this->assign('videosPerRow', OW::getConfig()->getValue('ivideo', 'videosPerRow')); $this->assign('addItemAuthorized', OW::getUser()->isAuthenticated() && OW::getUser()->isAuthorized('ivideo', 'add')); $this->setPageHeading(OW::getLanguage()->text('ivideo', 'admin_settings_title')); $this->setPageTitle(OW::getLanguage()->text('ivideo', 'admin_settings_title')); $this->setPageHeadingIconClass('ow_ic_gear_wheel'); }
/** * * @return BASE_CMP_ContentMenu */ protected function getMenu() { $event = new BASE_CLASS_EventCollector("base.moderation_tools.collect_menu"); OW::getEventManager()->trigger($event); $menuData = $event->getData(); if (empty($menuData)) { return null; } $menu = new BASE_CMP_ContentMenu(); foreach (array_reverse($menuData) as $item) { $element = new BASE_MenuItem(); $element->setUrl($item["url"]); $element->setLabel($item["label"]); $element->setIconClass($item["iconClass"]); $element->setKey($item["key"]); $menu->addElement($element); } return $menu; }
public static function getMenu($activeListType) { $language = OW::getLanguage(); $menuArray = array(array('label' => $language->text('base', 'user_list_menu_item_latest'), 'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'latest')), 'iconClass' => 'ow_ic_clock', 'key' => 'latest', 'order' => 1), array('label' => $language->text('base', 'user_list_menu_item_online'), 'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'online')), 'iconClass' => 'ow_ic_push_pin', 'key' => 'online', 'order' => 3), array('label' => $language->text('base', 'user_search_menu_item_label'), 'url' => OW::getRouter()->urlForRoute('users-search'), 'iconClass' => 'ow_ic_lens', 'key' => 'search', 'order' => 4)); if (BOL_UserService::getInstance()->countFeatured() > 0) { $menuArray[] = array('label' => $language->text('base', 'user_list_menu_item_featured'), 'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'featured')), 'iconClass' => 'ow_ic_push_pin', 'key' => 'featured', 'order' => 2); } $event = new BASE_CLASS_EventCollector('base.add_user_list'); OW::getEventManager()->trigger($event); $data = $event->getData(); if (!empty($data)) { $menuArray = array_merge($menuArray, $data); } $menu = new BASE_CMP_ContentMenu(); foreach ($menuArray as $item) { $menuItem = new BASE_MenuItem(); $menuItem->setLabel($item['label']); $menuItem->setIconClass($item['iconClass']); $menuItem->setUrl($item['url']); $menuItem->setKey($item['key']); $menuItem->setOrder(empty($item['order']) ? 999 : $item['order']); $menu->addElement($menuItem); if ($activeListType == $item['key']) { $menuItem->setActive(true); } } return $menu; }