當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。