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


PHP Menu::getMenu方法代码示例

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


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

示例1: testMenuRetrieval

 public function testMenuRetrieval()
 {
     $menu = new Menu();
     $menu->getMenu();
     $returned_response = $menu->getJsonString();
     $this->assertTrue($returned_response != Null, 'Menu Retrieval Unsuccessful');
 }
开发者ID:nsawant942,项目名称:Canteen-Management-Software-System--Witwatersrand,代码行数:7,代码来源:MenuTest.php

示例2: draw

 function draw()
 {
     global $display;
     $header_menu = Menu::getMenu();
     $display->add('header_menu', $header_menu);
     $display->output('AdminHome');
 }
开发者ID:hqd276,项目名称:bigs,代码行数:7,代码来源:AdminHome.php

示例3: setRightMenu

 private function setRightMenu()
 {
     $rightMenu = \Menu::getMenu('rightMenu');
     if (auth()->check()) {
         $rightMenu->link('create_issue', function (Link $link) {
             $link->name = 'Create Issue';
             $link->url = route('issue.create');
             $link->type = 'button';
             $link->classes = 'btn btn-primary-outline';
         });
         $rightMenu->dropDown('user', auth()->user()->display_name, function (DropDown $dropDown) {
             $dropDown->type = 'profile';
             $dropDown->image = Gravatar::src(auth()->user()->email, 30);
             $dropDown->link('user_profile', function (Link $link) {
                 $link->name = 'Profile';
                 $link->url = route('user.profile');
             });
         });
     } else {
         $rightMenu->link('login', function (Link $link) {
             $link->name = 'Login';
             $link->url = route('auth.login');
         });
         $rightMenu->link('register', function (Link $link) {
             $link->name = 'Register';
             $link->url = route('auth.register');
         });
     }
 }
开发者ID:NukaCode,项目名称:Miranda,代码行数:29,代码来源:BaseController.php

示例4: getMenu

 function getMenu()
 {
     $menu = new Menu($this->getName());
     $menu->addItem(new Menu_Item("?modus=news_create", "create"));
     $menu->addItem(new Menu_Item("?modus=news_show", "show"));
     return $menu->getMenu();
 }
开发者ID:microlefes,项目名称:Game,代码行数:7,代码来源:Module_News.php

示例5: setLeftMenu

 private function setLeftMenu()
 {
     $leftMenu = \Menu::getMenu('leftMenu');
     $leftMenu->link('home', function (Link $link) {
         $link->name = trans('menu.home');
         $link->url = route('home');
     });
 }
开发者ID:nukacode,项目名称:laravel-base,代码行数:8,代码来源:BaseController.php

示例6: draw

 function draw()
 {
     $export = Url::get('export');
     if (empty($export)) {
         global $display;
         $display->add('header_menu', Menu::getMenu());
         $display->add('admin_user', User::user_name());
         $display->output('Navigation');
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:10,代码来源:Navigation.php

示例7: init

 function init()
 {
     $this->registerAdminAction("remembercommentdata", "PluginRememberCommentDataConfigAction");
     $this->registerAdminAction("updateRememberCommentDataConfig", "PluginRememberCommentDataUpdateConfigAction");
     $menu =& Menu::getMenu();
     if (!$menu->entryExists("/menu/controlCenter/manageAppearancePlugins")) {
         $this->addMenuEntry("/menu/controlCenter", "manageAppearancePlugins", "", "", true, false);
     }
     $this->addMenuEntry("/menu/controlCenter/manageAppearancePlugins", "RememberCommentData", "?op=remembercommentdata", "");
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:10,代码来源:pluginremembercommentdata.class.php

示例8: init

 function init()
 {
     $this->registerAdminAction("nofollow", "PluginNoFollowConfigAction");
     $this->registerAdminAction("updateNoFollowConfig", "PluginNoFollowUpdateConfigAction");
     $menu =& Menu::getMenu();
     if (!$menu->entryExists("/menu/controlCenter/manageAntiSpamPlugins")) {
         $this->addMenuEntry("/menu/controlCenter", "manageAntiSpamPlugins", "", "", true, false);
     }
     $this->addMenuEntry("/menu/controlCenter/manageAntiSpamPlugins", "NoFollow", "?op=nofollow", "");
     $this->registerNotification(EVENT_PRE_COMMENT_ADD);
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:11,代码来源:pluginnofollow.class.php

示例9: init

 function init()
 {
     include_once PLOG_CLASS_PATH . "class/template/menu/menu.class.php";
     // register the filter
     $this->registerFilter("AuthImageFilter");
     $this->registerAdminAction("authimage", "PluginAuthImageConfigAction");
     $this->registerAdminAction("updateAuthImageConfig", "PluginAuthImageUpdateConfigAction");
     $this->registerBlogAction("AuthImageShow", "PluginAuthImageShowAction");
     $menu =& Menu::getMenu();
     if (!$menu->entryExists("/menu/controlCenter/manageAntiSpamPlugins")) {
         $this->addMenuEntry("/menu/controlCenter", "manageAntiSpamPlugins", "", "", true, false);
     }
     $this->addMenuEntry("/menu/controlCenter/manageAntiSpamPlugins", "AuthImage", "?op=authimage", "");
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:14,代码来源:pluginauthimage.class.php

示例10: init

 /**
  * registers all the filters and actions that we're going to use
  */
 function init()
 {
     // we only need to register a filter
     $this->registerFilter("SecretItemFilter");
     // register our action and menu entry
     $this->registerAdminAction("pluginSecretSettings", "AdminSecretPluginSettingsAction");
     $this->registerAdminAction("pluginSecretUpdateSettings", "AdminSecretPluginUpdateSettingsAction");
     // register our action and menu entry
     $menu =& Menu::getMenu();
     if (!$menu->entryExists("/menu/controlCenter/manageSecurityPlugins")) {
         $this->addMenuEntry("/menu/controlCenter", "manageSecurityPlugins", "", "", true, false);
     }
     $this->addMenuEntry("/menu/controlCenter/manageSecurityPlugins", "pluginSecretSettings", "admin.php?op=pluginSecretSettings", "", true, false);
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:17,代码来源:pluginsecret.class.php

示例11: init

 /**
  * registers all the filters and actions that we're going to use
  */
 function init()
 {
     // register the events we want
     $this->registerNotification(EVENT_POST_TRACKBACK_ADD);
     // register an action that will allow users to see which comments have not been
     // accepted yet
     $this->registerAdminAction("validatetrackbackPluginSettings", "AdminValidateTrackbackPluginSettingsAction");
     $this->registerAdminAction("validatetrackbackPluginUpdateSettings", "AdminValidateTrackbackPluginUpdateSettingsAction");
     // add a menu entry
     $menu =& Menu::getMenu();
     if (!$menu->entryExists("/menu/controlCenter/manageAntiSpamPlugins")) {
         $this->addMenuEntry("/menu/controlCenter", "manageAntiSpamPlugins", "", "", true, false);
     }
     $this->addMenuEntry("/menu/controlCenter/manageAntiSpamPlugins", "validatetrackbackPluginSettings", "admin.php?op=validatetrackbackPluginSettings", "", true, false);
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:18,代码来源:pluginvalidatetrackback.class.php

示例12: actionGetMenu

 /**
  * Processes menu data and sends HTTP Response to Client
  */
 public function actionGetMenu()
 {
     $model = new Menu();
     //This is to get the authentication detail and verifies if the menu should be parsed back
     //To be implemented at a later stage
     //$authDetails = http_get_request_body();
     //retrieval of menu from database and generate json string
     $model->getMenu();
     //retrieval of JSON string
     //$json_string = json_encode(array("updated" => "false", 'menu:'=>$menuEntries));
     $json_string = $model->getJsonString();
     //sending an http response with the menu in JSON formate
     HttpResponse::status(200);
     HttpResponse::setContentType('application/json');
     HttpResponse::setData($json_string);
     HttpResponse::send();
 }
开发者ID:nsawant942,项目名称:Canteen-Management-Software-System--Witwatersrand,代码行数:20,代码来源:MobileController.php

示例13: MainPageHandler

 function MainPageHandler()
 {
     $start_time = $this->getmicrotime();
     error_reporting(E_ALL);
     session_start();
     $this->_pObjInfo = new PageObjectInfo();
     $this->_layoutManager = new LayoutManager();
     $this->_input = new Input();
     $this->_input->load();
     $html = new Html();
     $menu = new Menu($html);
     $menu->getMenu('all');
     $this->setPage();
     $this->_input->unload();
     $end_time = $this->getmicrotime();
     //print $total_time = $end_time - $start_time;
 }
开发者ID:srookhuizen,项目名称:nedernesia,代码行数:17,代码来源:MainPageHandler.php

示例14: updatePage

 public function updatePage($aData, $aMenuData)
 {
     $content = trim(stripslashes($aData['content']));
     if (isset($aData['id'])) {
         $this->id = $aData['id'];
         $this->edited = new Doctrine_Expression("now()");
         if ($this->content != $content) {
             $this->backupPage();
         }
     } else {
         $this->created = new Doctrine_Expression("now()");
         $this->edited = new Doctrine_Expression("now()");
     }
     $this->pname = $aData['pname'];
     $this->link = Webbers_Normalize::Link($aData['pname']);
     $this->hd_title = $aData['hd_title'];
     $this->hd_keywords = $aData['hd_keywords'];
     $this->content = $content;
     $this->active = $aData['active'];
     $this->owner = Zend_Auth::getInstance()->getIdentity()->username;
     $this->save();
     if ($aData['menuitem'] == '0') {
         if (is_array($aMenuData) and $aMenuData['mname'] != '') {
             $aMenuData['active'] = $aData['active'];
             $aMenuData['Pages_id'] = $this->id;
             $aMenuData['link'] = '/pages/' . $this->link;
             $menu = new Menu();
             $menu->updateMenu($aMenuData);
         }
     } else {
         $menu = Menu::getMenu($aData['menuitem']);
         if ($menu->Pages_id > 0) {
             $oldMenu = Menu::getMenusByPageId($this->id);
             if ($oldMenu) {
                 $oldMenu->Pages_id = $menu->Pages_id;
                 $oldMenu->save();
             }
         }
         $menu->mname = $this->pname;
         $menu->active = $aData['active'];
         $menu->Pages_id = $this->id;
         $menu->link = '/pages/' . $this->link;
         $menu->save();
     }
     return $this->id;
 }
开发者ID:jager,项目名称:cms,代码行数:46,代码来源:Page.php

示例15: init

 /**
  * registers all the filters and actions that we're going to use
  */
 function init()
 {
     // register the events we want
     $this->registerNotification(EVENT_POST_POST_ADD);
     $this->registerNotification(EVENT_POST_POST_UPDATE);
     $this->registerNotification(EVENT_POST_POST_DELETE);
     // register an action that will allow users to see which comments have not been
     // accepted yet
     $this->registerAdminAction("sitemapPluginSettings", "AdminSiteMapPluginSettingsAction");
     $this->registerAdminAction("sitemapPluginUpdateSettings", "AdminSiteMapPluginUpdateSettingsAction");
     // add a menu entry
     $menu =& Menu::getMenu();
     if (!$menu->entryExists("/menu/controlCenter/manageSettings")) {
         $this->addMenuEntry("/menu/controlCenter", "manageSettings", "", "", true, false);
     }
     $this->addMenuEntry("/menu/controlCenter/manageSettings", "sitemapPluginSettings", "admin.php?op=sitemapPluginSettings", "", true, false);
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:20,代码来源:pluginsitemap.class.php


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