当前位置: 首页>>代码示例>>PHP>>正文


PHP BASE_MenuItem::setLabel方法代码示例

本文整理汇总了PHP中BASE_MenuItem::setLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP BASE_MenuItem::setLabel方法的具体用法?PHP BASE_MenuItem::setLabel怎么用?PHP BASE_MenuItem::setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BASE_MenuItem的用法示例。


在下文中一共展示了BASE_MenuItem::setLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMenu

 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('questions', 'list_all_tab'));
     $menuItem->setOrder(1);
     $menuItem->setUrl(OW::getRouter()->urlForRoute('questions-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('questions', 'list_friends_tab'));
             $menuItem->setOrder(2);
             $menuItem->setUrl(OW::getRouter()->urlForRoute('questions-friends'));
             $menuItem->setIconClass('ow_ic_user');
             $menu->addElement($menuItem);
         }
         $menuItem = new BASE_MenuItem();
         $menuItem->setKey('my');
         $menuItem->setPrefix('questions');
         $menuItem->setLabel($language->text('questions', 'list_my_tab'));
         $menuItem->setOrder(3);
         $menuItem->setUrl(OW::getRouter()->urlForRoute('questions-my'));
         $menuItem->setIconClass('ow_ic_user');
         $menu->addElement($menuItem);
     }
     return $menu;
 }
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:34,代码来源:feed_menu.php

示例2: getMenu

 public function getMenu()
 {
     $items = array();
     $item = new BASE_MenuItem();
     $item->setLabel(OW::getLanguage()->text('admin', 'edit_language'));
     $item->setIconClass('ow_ic_edit');
     $item->setKey('edit_lang');
     if ($this->isDevMode()) {
         $item->setUrl(OW::getRouter()->urlForRoute('admin_developer_tools_language'));
     } else {
         $item->setUrl(OW::getRouter()->urlForRoute('admin_languages_index'));
     }
     $item->setOrder(1);
     $items[] = $item;
     $item = new BASE_MenuItem();
     $item->setLabel(OW::getLanguage()->text('admin', 'available_languages'));
     $item->setIconClass('ow_ic_files');
     $item->setKey('avail_lang');
     if ($this->isDevMode()) {
         $item->setUrl(OW::getRouter()->urlForRoute('admin_developer_tools_language_mod'));
     } else {
         $item->setUrl(OW::getRouter()->urlFor('ADMIN_CTRL_Languages', 'mod'));
     }
     $item->setOrder(2);
     $items[] = $item;
     return new BASE_CMP_ContentMenu($items);
 }
开发者ID:hardikamutech,项目名称:hammu,代码行数:27,代码来源:languages.php

示例3: __construct

 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');
 }
开发者ID:vazahat,项目名称:dudex,代码行数:28,代码来源:admin.php

示例4: getMenu

 /**
  * Returns menu component
  *
  * @return BASE_CMP_ContentMenu
  */
 private function getMenu()
 {
     $language = OW::getLanguage();
     $validLists = array('photo', 'album', 'tagged');
     $classes = array('', '', 'ow_ic_tag');
     $urls = array(OW::getRouter()->urlForRoute('photo_list_index'), OW::getRouter()->urlForRoute('photo_list_albums'), '');
     $titles = array($language->text('advancedphoto', 'photos'), $language->text('advancedphoto', 'albums'), $language->text('photo', 'menu_tagged'));
     if ($user = OW::getUser()->getUserObject()) {
         $validLists[3] = "myalbum";
         $classes[3] = "";
         $urls[3] = OW::getRouter()->urlForRoute('photo_user_albums', array('user' => $user->username));
         $titles[3] = $language->text('advancedphoto', 'my_albums');
     }
     $checkPrivacy = PHOTO_BOL_PhotoService::getInstance()->countPhotos('featured');
     if (!PHOTO_BOL_PhotoService::getInstance()->countPhotos('featured', $checkPrivacy)) {
         array_shift($validLists);
         array_shift($classes);
     }
     $menuItems = array();
     $order = 0;
     foreach ($validLists as $type) {
         $item = new BASE_MenuItem();
         $item->setLabel($titles[$order]);
         $item->setUrl($urls[$order] != '' ? $urls[$order] : OW::getRouter()->urlForRoute('view_photo_list', array('listType' => $type)));
         $item->setKey($type);
         $item->setIconClass($classes[$order]);
         $item->setOrder($order);
         array_push($menuItems, $item);
         $order++;
     }
     $menu = new BASE_CMP_ContentMenu($menuItems);
     return $menu;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:38,代码来源:photo.php

示例5: __construct

 /**
  * 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');
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:30,代码来源:admin.php

示例6: __construct

 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;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:32,代码来源:admin.php

示例7: getMenu

 private function getMenu()
 {
     $language = OW::getLanguage();
     $menuItems = array();
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('membership', 'admin_menu_memberships'));
     $item->setUrl(OW::getRouter()->urlForRoute('membership_admin'));
     $item->setKey('memberships');
     $item->setIconClass('ow_ic_update');
     $item->setOrder(0);
     $menuItems[] = $item;
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('membership', 'admin_menu_subscribe'));
     $item->setUrl(OW::getRouter()->urlForRoute('membership_admin_subscribe'));
     $item->setKey('subscribe');
     $item->setIconClass('ow_ic_script');
     $item->setOrder(1);
     $menuItems[] = $item;
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('membership', 'admin_menu_browse_users'));
     $item->setUrl(OW::getRouter()->urlForRoute('membership_admin_browse_users_st'));
     $item->setKey('users');
     $item->setIconClass('ow_ic_user');
     $item->setOrder(2);
     $menuItems[] = $item;
     return new BASE_CMP_ContentMenu($menuItems);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:27,代码来源:admin.php

示例8: index

 public function index()
 {
     $language = OW::getLanguage();
     $this->setPageHeading($language->text('ynsocialpublisher', 'admin_config'));
     $this->setPageHeadingIconClass('ow_ic_picture');
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('ynsocialpublisher', 'admin_menu_general'));
     $item->setUrl(OW::getRouter()->urlForRoute('ynsocialpublisher.admin'));
     $item->setKey('general');
     $item->setIconClass('ow_ic_gear_wheel');
     $item->setOrder(0);
     $item->setActive(true);
     $menu = new BASE_CMP_ContentMenu(array($item));
     $this->addComponent('menu', $menu);
     $service = YNSOCIALPUBLISHER_BOL_Service::getInstance();
     $plugins = $service->getEnabledPlugins();
     $this->assign('plugins', $plugins);
     $form_url = OW::getRouter()->urlForRoute('ynsocialpublisher.admin');
     $this->assign('form_url', $form_url);
     if (OW::getRequest()->isPost()) {
         // get plugins data from post
         $params = $_POST['params'];
         foreach ($params as $key => $settings) {
             if (!isset($settings['providers'])) {
                 $settings['providers'] = array();
             }
             OW::getConfig()->saveConfig('ynsocialpublisher', $key, json_encode($settings));
         }
         OW::getFeedback()->info($language->text('ynsocialpublisher', 'settings_updated'));
         $this->redirect($form_url);
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:32,代码来源:admin.php

示例9: getMenu

 private function getMenu()
 {
     $language = OW::getLanguage();
     $menuItems = array();
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('admin', 'menu_item_basics'));
     $item->setUrl(OW::getRouter()->urlForRoute('admin_settings_main'));
     $item->setKey('basics');
     $item->setIconClass('ow_ic_gear_wheel');
     $item->setOrder(0);
     $menuItems[] = $item;
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('admin', 'menu_item_page_settings'));
     $item->setUrl(OW::getRouter()->urlForRoute('admin_settings_page'));
     $item->setKey('page');
     $item->setIconClass('ow_ic_file');
     $item->setOrder(1);
     $menuItems[] = $item;
     if (!defined('OW_PLUGIN_XP')) {
         $item = new BASE_MenuItem();
         $item->setLabel($language->text('admin', 'menu_item_mail_settings'));
         $item->setUrl(OW::getRouter()->urlForRoute('admin_settings_mail'));
         $item->setKey('mail');
         $item->setIconClass('ow_ic_mail');
         $item->setOrder(2);
         $menuItems[] = $item;
     }
     return new BASE_CMP_ContentMenu($menuItems);
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:29,代码来源:settings.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $menuItems = array();
     $item = new BASE_MenuItem();
     $item->setLabel(OW::getLanguage()->text('profileprogressbar', 'themes_menu_item'));
     $item->setUrl(OW::getRouter()->urlForRoute('profileprogressbar.admin'));
     $item->setIconClass('ow_ic_picture');
     $item->setOrder(0);
     array_push($menuItems, $item);
     $item = new BASE_MenuItem();
     $item->setLabel(OW::getLanguage()->text('profileprogressbar', 'features_menu_item'));
     $item->setUrl(OW::getRouter()->urlForRoute('profileprogressbar.admin_features'));
     $item->setIconClass('ow_ic_flag');
     $item->setOrder(1);
     array_push($menuItems, $item);
     $item = new BASE_MenuItem();
     $item->setLabel(OW::getLanguage()->text('profileprogressbar', 'hint_menu_item'));
     $item->setUrl(OW::getRouter()->urlForRoute('profileprogressbar.admin_hint'));
     $item->setIconClass('ow_ic_comment');
     $item->setOrder(2);
     array_push($menuItems, $item);
     $this->addComponent('menu', new BASE_CMP_ContentMenu($menuItems));
     $this->document = OW::getDocument();
     $this->plugin = OW::getPluginManager()->getPlugin('profileprogressbar');
     $this->theme = OW::getConfig()->getValue('profileprogressbar', 'theme');
 }
开发者ID:vazahat,项目名称:dudex,代码行数:27,代码来源:admin.php

示例11: init

 /**
  * @see OW_ActionController::init()
  *
  */
 public function init()
 {
     parent::init();
     $language = OW::getLanguage();
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('mailbox', 'inbox_label'));
     $item->setIconClass('ow_ic_down_arrow');
     $item->setUrl(OW::getRouter()->urlForRoute("mailbox_default"));
     $item->setKey('inbox');
     $item->setOrder(1);
     $menuItems[] = $item;
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('mailbox', 'sent_label'));
     $item->setIconClass('ow_ic_up_arrow');
     $item->setUrl(OW::getRouter()->urlForRoute("mailbox_sent"));
     $item->setKey('sent');
     $item->setOrder(2);
     $menuItems[] = $item;
     $event = new BASE_CLASS_EventCollector('mailbox.collect_menu_items');
     OW::getEventManager()->trigger($event);
     foreach ($event->getData() as $menuItem) {
         $menuItems[] = $menuItem;
     }
     $this->contentMenu = new BASE_CMP_ContentMenu($menuItems);
     $this->addComponent("mailbox_menu", $this->contentMenu);
     $this->setPageHeading($language->text('mailbox', 'mailbox'));
     $this->setPageHeadingIconClass('ow_ic_mail');
     $this->recordsToPage = (int) OW::getConfig()->getValue('mailbox', 'results_per_page');
     if ($this->recordsToPage === 0) {
         $this->recordsToPage = self::MAILBOX_RECORDS_TO_PAGE;
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:36,代码来源:mailbox.php

示例12: getMenu

 private function getMenu()
 {
     $lang = OW::getLanguage();
     $router = OW::getRouter();
     $items = array();
     $item = new BASE_MenuItem();
     $item->setLabel($lang->text('usearch', 'user_list'));
     $item->setOrder(0);
     $item->setKey('photo_gallery');
     $item->setIconClass('ow_ic_picture');
     $item->setUrl($router->urlForRoute('users-search-result'));
     array_push($items, $item);
     //        $item = new BASE_MenuItem();
     //        $item->setLabel($lang->text('usearch', 'profile_details'));
     //        $item->setOrder(1);
     //        $item->setKey('profile_details');
     //        $item->setIconClass('ow_ic_comment');
     //        $item->setUrl($router->urlForRoute('usearch.details'));
     //        array_push($items, $item);
     if (OW::getPluginManager()->isPluginActive('googlelocation')) {
         $item = new BASE_MenuItem();
         $item->setLabel($lang->text('usearch', 'map'));
         $item->setOrder(2);
         $item->setKey('map');
         $item->setIconClass('ow_ic_places');
         $item->setUrl($router->urlForRoute('usearch.map'));
         array_push($items, $item);
     }
     return new BASE_CMP_ContentMenu($items);
 }
开发者ID:hardikamutech,项目名称:hammu,代码行数:30,代码来源:search.php

示例13: index

 /**
  * Default action
  */
 public function index()
 {
     $language = OW::getLanguage();
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('gphotoviewer', 'admin_menu_general'));
     $item->setUrl(OW::getRouter()->urlForRoute('gphotoviewer.admin_config'));
     $item->setKey('general');
     $item->setIconClass('ow_ic_gear_wheel');
     $item->setOrder(0);
     $menu = new BASE_CMP_ContentMenu(array($item));
     $this->addComponent('menu', $menu);
     $configs = OW::getConfig()->getValues('gphotoviewer');
     $configSaveForm = new ConfigSaveForm();
     $this->addForm($configSaveForm);
     if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) {
         $res = $configSaveForm->process();
         OW::getFeedback()->info($language->text('gphotoviewer', 'settings_updated'));
         $this->redirect(OW::getRouter()->urlForRoute('gphotoviewer.admin_config'));
     }
     if (!OW::getRequest()->isAjax()) {
         $this->setPageHeading(OW::getLanguage()->text('gphotoviewer', 'admin_config'));
         $this->setPageHeadingIconClass('ow_ic_picture');
         $elem = $menu->getElement('general');
         if ($elem) {
             $elem->setActive(true);
         }
     }
     $configSaveForm->getElement('enablePhotoviewer')->setValue($configs['enable_photo_viewer']);
     $configSaveForm->getElement('downloadable')->setValue($configs['can_users_to_download_photos']);
     $configSaveForm->getElement('slideshowTime')->setValue($configs['slideshow_time_per_a_photo']);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:34,代码来源:admin.php

示例14: initMenu

 public function initMenu()
 {
     $menuItems = array();
     $listNames = array('connects' => array('iconClass' => 'ow_yn_socialbridge_connects'));
     $listNames = array('connects' => array('iconClass' => 'ow_yn_socialbridge_connects'));
     if (OW::getPluginManager()->isPluginActive('ynsocialstream')) {
         $listNames['stream-settings'] = array('iconClass' => 'ow_yn_socialstream');
     }
     if (OW::getPluginManager()->isPluginActive('ynsocialpublisher')) {
         $listNames['publisher-settings'] = array('iconClass' => 'ow_yn_socialpublisher');
     }
     $count = 0;
     foreach ($listNames as $actionKey => $actionArr) {
         $menuItem = new BASE_MenuItem();
         $menuItem->setKey($actionKey);
         $menuItem->setUrl(OW::getRouter()->urlForRoute('ynsocialbridge-' . $actionKey));
         $menuItem->setOrder($count);
         $menuItem->setLabel(OW::getLanguage()->text('ynsocialbridge', 'menu_item_' . $actionKey));
         $menuItem->setIconClass($actionArr['iconClass']);
         $menuItems[] = $menuItem;
         $count++;
     }
     $contentMenu = new BASE_CMP_ContentMenu($menuItems);
     return $contentMenu;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:25,代码来源:core.php

示例15: getMenu

 function getMenu()
 {
     $language = OW::getLanguage();
     $menu = new BASE_CMP_ContentMenu();
     $menuItems = array();
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('spvideolite', 'adm_menu_tweaks'));
     $item->setUrl(OW::getRouter()->urlForRoute('spvideolite.admin'));
     $item->setKey('tweaks');
     $item->setIconClass('ow_ic_star');
     $item->setOrder(0);
     $menuItems[] = $item;
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('spvideolite', 'adm_menu_upload'));
     $item->setUrl(OW::getRouter()->urlForRoute('spvideolite.admin_upload'));
     $item->setKey('help');
     $item->setIconClass('ow_ic_attach');
     $item->setOrder(1);
     $menuItems[] = $item;
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('spvideolite', 'adm_menu_help'));
     $item->setUrl(OW::getRouter()->urlForRoute('spvideolite.admin_help'));
     $item->setKey('help');
     $item->setIconClass('ow_ic_help');
     $item->setOrder(2);
     $menuItems[] = $item;
     $menu->setMenuItems($menuItems);
     $menu->deactivateElements();
     return $menu;
 }
开发者ID:mohamedveto,项目名称:spvideolite,代码行数:30,代码来源:admin.php


注:本文中的BASE_MenuItem::setLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。