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


PHP Menu::instance方法代码示例

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


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

示例1: getInstance

 public static function getInstance()
 {
     if (self::$instance == null) {
         self::$instance = new Menu();
     }
     return self::$instance;
 }
开发者ID:jorgeACVD,项目名称:GruposEstudiantiles,代码行数:7,代码来源:Menu.php

示例2: getInstance

 public static function getInstance()
 {
     if (null === self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:hendrikstill,项目名称:manusing,代码行数:7,代码来源:Menu.php

示例3: render

 function render()
 {
     $menu = Menu::instance();
     $this->_view['all_menu'] = $menu->getAll();
     $this->_view['current'] = $menu->getCurrentMainMenu();
     return $this->_fetchView(dirname(__FILE__) . '/navmain_view.php');
 }
开发者ID:BGCX262,项目名称:zys-blog-svn-to-git,代码行数:7,代码来源:navmain.php

示例4: me

 public static function me()
 {
     if (is_null(self::$instance)) {
         self::$instance = new Menu();
     }
     return self::$instance;
 }
开发者ID:kostarev,项目名称:test,代码行数:7,代码来源:Menu.php

示例5: render

 public function render()
 {
     $menu = Menu::instance('submenu')->render();
     if (empty($menu)) {
         return '';
     }
     return View::factory('widgets/submenu')->set(array('menu' => $menu))->render();
 }
开发者ID:googlecode-mirror,项目名称:s7ncms,代码行数:8,代码来源:Submenu.php

示例6: render

 function render($return = false)
 {
     $context = $this->context->parent();
     $menu = Menu::instance();
     $this->view['all_menu'] = $menu->getAll();
     $this->view['current'] = $menu->getCurrentMainMenu($context);
     return $this->_renderBlock('navmain', $return);
 }
开发者ID:fchaose,项目名称:qeephp,代码行数:8,代码来源:navmain.php

示例7: render

 function render()
 {
     $menu = Menu::instance();
     $this->_view['menu'] = $menu;
     $this->_view['main'] = $menu->getCurrentMainMenu();
     $this->_view['current'] = $menu->getCurrentSubMenu($this->_view['main']['items']);
     return $this->_fetchView(dirname(__FILE__) . '/submenu_view.php');
 }
开发者ID:Debenson,项目名称:openwan,代码行数:8,代码来源:submenu.php

示例8: render

 function render($return = false)
 {
     $context = $this->context->parent();
     $menu = Menu::instance();
     $this->view['menu'] = $menu;
     $this->view['main'] = $menu->getCurrentMainMenu($context);
     $this->view['current'] = $menu->getCurrentSubMenu($context, $this->view['main']['items']);
     return $this->_renderBlock('submenu', $return);
 }
开发者ID:fchaose,项目名称:qeephp,代码行数:9,代码来源:submenu.php

示例9: run

 public function run()
 {
     $menu = Menu::instance();
     $manager = Manager::instance();
     $settings = Settings::instance();
     $attachment_edit = AttachmentEdit::instance();
     $menu->set_manager($manager);
     $menu->set_settings($settings);
     $menu->init_pages();
     add_action('wpod', array($menu, 'add_components'));
     add_action('admin_enqueue_scripts', array($attachment_edit, 'enqueue_scripts'), 10, 1);
     add_action('attachment_submitbox_misc_actions', array($attachment_edit, 'attachment_submitbox_misc_actions'), 100, 0);
     add_filter('map_meta_cap', array($this, 'map_meta_cap'), 10, 4);
 }
开发者ID:felixarntz,项目名称:wp-gcs-offload,代码行数:14,代码来源:Admin.php

示例10: test2

 function test2()
 {
     return Menu::instance('test2');
 }
开发者ID:carriercomm,项目名称:NeoBill,代码行数:4,代码来源:menu.class.php

示例11: render

 public function render($only_children = FALSE)
 {
     $this->rendered = TRUE;
     if ($only_children === TRUE) {
         $output = '';
         foreach ($this->children as $child) {
             $output .= Menu::instance()->get($child);
         }
         return $output;
     }
     $class = $this->active === TRUE ? 'active' : '';
     if (empty($this->children)) {
         return '<li class="' . $class . '">' . html::anchor($this->uri, html::specialchars($this->title), array('class' => $class)) . '</li>';
     }
     $output = '<li class="' . $class . '">' . html::anchor($this->uri, html::specialchars($this->title), array('class' => $class));
     $output .= '<ul>';
     foreach ($this->children as $child) {
         $output .= Menu::instance()->get($child)->render();
     }
     $output .= '</ul></li>';
     return $output;
 }
开发者ID:googlecode-mirror,项目名称:s7ncms,代码行数:22,代码来源:Menu.php

示例12:

	</head>
	<body>
		<?php 
Event::run('s7n.theme.page_top');
?>
		<div id="header">
			<div class="widthfix">
				<div class="logo">
					<h1><?php 
echo html::anchor('/', config::get('s7n.site_title'));
?>
</h1>
				</div>
				<div class="clear"></div>
				<?php 
echo Menu::instance();
?>
			</div>
		</div>
		<div id="content">
			<div id="article">
				<div class="entry">
					<?php 
echo $content;
?>
				</div>
			</div>
			<div id="sidebar">
				<?php 
echo Widget::factory('Submenu');
?>
开发者ID:googlecode-mirror,项目名称:s7ncms,代码行数:31,代码来源:template.php

示例13:

<?php

$leftMenu = Menu::instance('admin-menu');
$rightMenu = Menu::instance('admin-menu-right');
/**
 * @see https://github.com/pingpong-labs/menus
 * 
 * @example adding additional menu.
 *
 * $leftMenu->url('your-url', 'The Title');
 * 
 * $leftMenu->route('your-route', 'The Title');
 */
开发者ID:caicaicai,项目名称:laravelwithadmin,代码行数:13,代码来源:menus.php

示例14:

<?php

$leftMenu = Menu::instance('admin-menu');
$rightMenu = Menu::instance('admin-menu-right');
$shopMenu = Menu::instance('shop-menu');
/**
 * @see https://github.com/pingpong-labs/menus
 * 
 * @example adding additional menu.
 *
 * $leftMenu->url('your-url', 'The Title');
 * 
 * $leftMenu->route('your-route', 'The Title');
 */
开发者ID:peshkov3,项目名称:mircurius,代码行数:14,代码来源:menus.php

示例15: function

<?php

$menu = Menu::instance('sidebar');
$menu->dropdown('Settings', function ($sub) {
    $sub->url('administrator/settings', 'General', 1, ['icon' => 'fa fa-circle-o']);
}, 6, ['icon' => 'fa fa-wrench']);
开发者ID:pingpongcms,项目名称:settings,代码行数:6,代码来源:menus.php


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