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


PHP Action::menuItem方法代码示例

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


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

示例1: onEndAccountSettingsNav

 /**
  * Menu item for personal subscriptions/groups area
  *
  * @param Action $action action being executed
  *
  * @return boolean hook return
  */
 function onEndAccountSettingsNav($action)
 {
     $action_name = $action->trimmed('action');
     common_debug("ACTION NAME = " . $action_name);
     $action->menuItem(common_local_url('mirrorsettings'), _m('MENU', 'Mirroring'), _m('Configure mirroring of posts from other feeds'), $action_name === 'mirrorsettings');
     return true;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:14,代码来源:SubMirrorPlugin.php

示例2: onStartPrimaryNav

 /**
  * Modify the default menu
  *
  * @param Action $action The current action handler. Use this to
  *                       do any output.
  *
  * @return boolean hook value; true means continue processing, false means stop.
  *
  * @see Action
  */
 function onStartPrimaryNav($action)
 {
     $user = common_current_user();
     if (!empty($user)) {
         $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)), _m('Home'), _m('Friends timeline'), false, 'nav_home');
         $action->menuItem(common_local_url('showstream', array('nickname' => $user->nickname)), _m('Profile'), _m('Your profile'), false, 'nav_profile');
         $action->menuItem(common_local_url('public'), _m('Public'), _m('Everyone on this site'), false, 'nav_public');
         $action->menuItem(common_local_url('profilesettings'), _m('Settings'), _m('Change your personal settings'), false, 'nav_account');
         if ($user->hasRight(Right::CONFIGURESITE)) {
             $action->menuItem(common_local_url('siteadminpanel'), _m('Admin'), _m('Site configuration'), false, 'nav_admin');
         }
         $action->menuItem(common_local_url('logout'), _m('Logout'), _m('Logout from the site'), false, 'nav_logout');
     } else {
         $action->menuItem(common_local_url('public'), _m('Public'), _m('Everyone on this site'), false, 'nav_public');
         $action->menuItem(common_local_url('login'), _m('Login'), _m('Login to the site'), false, 'nav_login');
     }
     if (!empty($user) || !common_config('site', 'private')) {
         $action->menuItem(common_local_url('noticesearch'), _m('Search'), _m('Search the site'), false, 'nav_search');
     }
     Event::handle('EndPrimaryNav', array($action));
     return false;
 }
开发者ID:microcosmx,项目名称:experiments,代码行数:32,代码来源:NewMenuPlugin.php

示例3: onEndAccountSettingsNav

 /**
  * Menu item for Qvitter
  *
  * @param Action $action action being executed
  *
  * @return boolean hook return
  */
 function onEndAccountSettingsNav($action)
 {
     $action_name = $action->trimmed('action');
     $action->menuItem(common_local_url('qvittersettings'), _m('MENU', 'Qvitter'), _m('Qvitter Settings'), $action_name === 'qvittersettings');
     return true;
 }
开发者ID:GreenLunar,项目名称:qvitter,代码行数:13,代码来源:QvitterPlugin.php

示例4: showOpenIDLoginTab

 /**
  * Show menu item for login
  *
  * @param Action $action Action being executed
  *
  * @return void
  */
 function showOpenIDLoginTab($action)
 {
     $action_name = $action->trimmed('action');
     $action->menuItem(common_local_url('openidlogin'), _m('OpenID'), _m('Login or register with OpenID'), $action_name === 'openidlogin');
 }
开发者ID:sukhjindersingh,项目名称:PHInest-Solutions,代码行数:12,代码来源:OpenIDPlugin.php

示例5: onEndConnectSettingsNav

 /**
  * Add the Twitter Settings page to the Connect Settings menu
  *
  * @param Action $action The calling page
  *
  * @return boolean hook return
  */
 function onEndConnectSettingsNav($action)
 {
     if (self::hasKeys()) {
         $action_name = $action->trimmed('action');
         $action->menuItem(common_local_url('twittersettings'), _m('MENU', 'Twitter'), _m('Twitter integration options'), $action_name === 'twittersettings');
     }
     return true;
 }
开发者ID:phpsource,项目名称:gnu-social,代码行数:15,代码来源:TwitterBridgePlugin.php

示例6: onEndPrimaryNav

 /**
  * Modify the default menu to link to our custom action
  *
  * Using event handlers, it's possible to modify the default UI for pages
  * almost without limit. In this method, we add a menu item to the default
  * primary menu for the interface to link to our action.
  *
  * The Action class provides a rich set of events to hook, as well as output
  * methods.
  *
  * @param Action $action The current action handler. Use this to
  *                       do any output.
  *
  * @return boolean hook value; true means continue processing, false means stop.
  *
  * @see Action
  */
 function onEndPrimaryNav($action)
 {
     // common_local_url() gets the correct URL for the action name
     // we provide
     $action->menuItem(common_local_url('hello'), _m('Hello'), _m('A warm greeting'), false, 'nav_hello');
     return true;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:24,代码来源:SamplePlugin.php

示例7: onEndAccountSettingsNav

 /**
  * Menu item for personal subscriptions/groups area
  *
  * @param Action $action action being executed
  *
  * @return boolean hook return
  */
 function onEndAccountSettingsNav($action)
 {
     $action_name = $action->trimmed('action');
     $action->menuItem(common_local_url('pollsettings'), _m('MENU', 'Polls'), _m('Configure poll behavior'), $action_name === 'pollsettings');
     return true;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:13,代码来源:PollPlugin.php

示例8: onEndAccountSettingsNav

 /**
  * Menu item for OpenID settings
  *
  * @param Action $action Action being executed
  *
  * @return boolean hook return
  */
 function onEndAccountSettingsNav($action)
 {
     $action_name = $action->trimmed('action');
     $action->menuItem(common_local_url('openidsettings'), _m('MENU', 'OpenID'), _m('Add or remove OpenIDs.'), $action_name === 'openidsettings');
     return true;
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:13,代码来源:OpenIDPlugin.php

示例9: onEndAccountSettingsNav

 /**
  * Add the FetLife Settings page to the Account Settings menu
  *
  * @param Action $action The calling page
  * @return boolean hook return
  */
 function onEndAccountSettingsNav($action)
 {
     $action_name = $action->trimmed('action');
     $action->menuItem(common_local_url('fetlifesettings'), 'FetLife', 'FetLife integration options', 'fetlifesettings' === $action_name);
     return true;
 }
开发者ID:reaction,项目名称:fetlife-bridge,代码行数:12,代码来源:FetLifeBridgePlugin.php

示例10: onEndAccountSettingsNav

 /**
  * Menu item for ChooseTheme
  *
  * @param Action $action action being executed
  *
  * @return boolean hook return
  */
 function onEndAccountSettingsNav(Action $action)
 {
     $action_name = $action->getActionName();
     $action->menuItem(common_local_url('choosethemesettings'), _m('MENU', 'Theme'), _m('Choose Theme'), $action_name === 'themesettings');
     return true;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:13,代码来源:ChooseThemePlugin.php

示例11: onEndPersonalGroupNav

 /**
  * Modify the default menu to link to our custom action
  *
  * Using event handlers, it's possible to modify the default UI for pages
  * almost without limit. In this method, we add a menu item to the default
  * primary menu for the interface to link to our action.
  *
  * The Action class provides a rich set of events to hook, as well as output
  * methods.
  *
  * @param Action $action The current action handler. Use this to
  * do any output.
  *
  * @return boolean hook value; true means continue processing, false means stop.
  *
  * @see Action
  */
 function onEndPersonalGroupNav($action)
 {
     $this->user = common_current_user();
     if (!$this->user) {
         // TRANS: Client error displayed when trying to display bookmarks for a non-existing user.
         $this->clientError(_('No such user.'));
         return false;
     }
     $action->menuItem(common_local_url('bookmarks', array('nickname' => $this->user->nickname)), _m('Bookmarks'), _m('A list of your bookmarks'), false, 'nav_timeline_bookmarks');
     return true;
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:28,代码来源:BookmarkPlugin.php


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