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


PHP Zend_View::navigation方法代码示例

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


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

示例1: sidebarMenu

 function sidebarMenu()
 {
     $config = new Zend_Config_Xml(APPLICATION_PATH . '/modules/admin/configs/sidebar.xml', 'sidebar');
     $container = new Zend_Navigation();
     $container->setPages($config->toArray());
     $view = new Zend_View();
     echo $view->navigation($container)->menu()->setMaxDepth(1)->render();
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:8,代码来源:SidebarMenu.php

示例2: navbarMainMenu

 function navbarMainMenu()
 {
     $config = new Zend_Config_Xml(APPLICATION_PATH . '/modules/admin/configs/navbar.xml', 'main');
     $container = new Zend_Navigation();
     $container->setPages($config->toArray());
     $view = new Zend_View();
     echo $view->navigation($container)->menu()->setUlClass('nav navbar-nav')->setMaxDepth(0)->render();
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:8,代码来源:NavbarMainMenu.php

示例3: getFull

 /**
  * Полностью раскрытое дерево
  *
  * @return Zend_View_Helper_Navigation_Menu
  */
 private function getFull()
 {
     $menu = $this->_view->navigation()->menu($this->_categories);
     if (isset($this->_options['showindex']) && $this->_options['showindex'] == 'no') {
         $menu->setMinDepth(1)->setMaxDepth(null);
     } else {
         $menu->setMinDepth(null)->setMaxDepth(null);
     }
     return $menu;
 }
开发者ID:ei-grad,项目名称:phorm,代码行数:15,代码来源:Menu.php

示例4: preDispatch

 /**
  * Initialise the navigation system
  *
  * (non-PHPdoc)
  * @see Zend_Controller_Plugin_Abstract::preDispatch()
  */
 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     // If we are on the error controller, return immediately to prevent
     // any database errors happening on error page
     if ($request->controller == "error") {
         return;
     }
     $nav = array();
     if ($this->_view->logged_in) {
         // Always add home link
         $nav[] = array("label" => "Home", "id" => "home-link", "uri" => "/home");
         // If we're in a project, add in the things you can do
         if ($project_slug = $request->getParam("project")) {
             $projects = new GD_Model_ProjectsMapper();
             $project = $projects->getProjectBySlug($project_slug);
             if ($project instanceof GD_Model_Project) {
                 $nav[] = array("label" => "History", "id" => "deployments-link", "uri" => "/project/{$project_slug}/history");
                 $nav[] = array("label" => "Settings", "id" => "settings-link", "uri" => "/project/{$project_slug}/settings");
                 $nav[] = array("label" => "Deploy", "id" => "deploy-link", "uri" => "/project/{$project_slug}/deploy");
             }
         } else {
             $nav[] = array("label" => "Profile", "id" => "profile-link", "uri" => "/profile");
             // Get the logged in user - if they're an admin, add the admin
             // menu
             $user = GD_Auth_Database::GetLoggedInUser();
             if ($user->isAdmin()) {
                 $nav[] = array("label" => "Admin", "id" => "admin-link", "uri" => "/admin");
             }
         }
     } else {
         $nav[] = array("label" => "Login", "id" => "login-link", "uri" => "/auth/login");
     }
     // Create a Zend_Navigation object from the above array
     $nav = new Zend_Navigation($nav);
     $this->_view->navigation($nav);
     // This finds out if the current URL matches one of the menu items
     // and sets the active page if it does.
     $uri = $request->getRequestUri();
     $page = $this->_view->navigation()->findOneBy("uri", $uri);
     if ($page) {
         $page->setActive();
     }
 }
开发者ID:robertbasic,项目名称:godeploy,代码行数:49,代码来源:Navigation.php

示例5: navbarRightMenu

 function navbarRightMenu()
 {
     $config = new Zend_Config_Xml(APPLICATION_PATH . '/modules/admin/configs/navbar.xml', 'nav');
     $container = new Zend_Navigation();
     $container->setPages($config->toArray());
     /*$container->addPage(
       array(
           'label'      => Zend_Auth::getInstance()->getIdentity()->email,
           'title'      => 'Dashboard',
           'uri'     => '/admin/'
       ));*/
     $view = new Zend_View();
     echo $view->navigation($container)->menu()->setUlClass('dropdown-menu')->render();
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:14,代码来源:NavbarRightMenu.php

示例6: _initView

 public function _initView()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->env = APPLICATION_ENV;
     $config = new Zend_Config_Xml(APPLICATION_PATH . "/configs/menu.xml", "nav");
     $nav = new Zend_Navigation($config);
     $view->navigation($nav);
     $render = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $render->setView($view);
     /*
     		$c = $nav->findAllByController('index');
     		$a = $nav->findAllByAction("index");
     		$found = array_intersect($c, $a);
     */
     return $view;
 }
开发者ID:jalbertbowden,项目名称:twiliokit,代码行数:17,代码来源:bootstrap.php

示例7: Menu

///////////////////////////////////////////////////////////////////////////////
$view = new Zend_View();
$view->registerHelper(new Menu(), 'menu');
///////////////////////////////////////////////////////////////////////////////
?>

<html>
    <head>
        <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" />
        <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" />
    </head>
    <body>
        <div class="navbar">
            <div class="navbar-inner">
                <div class="container">
                    <?php 
echo $view->navigation($demoMenu)->menu()->setMinDepth(1)->setMaxDepth(-1)->setRenderParents(false)->setUlClass('nav');
?>
                </div>
            </div>
        </div>
        
        <?php 
echo $view->navigation($demoMenu)->menu()->setMinDepth(1)->setMaxDepth(1)->setUlClass("nav nav-list")->setRenderParents(false);
?>
        
        <script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>
        <script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js"></script>
    </body>
</html>
开发者ID:kdubuc,项目名称:zf1-navigation-view-helper-bootstrap,代码行数:30,代码来源:index.php

示例8: navMenu

 function navMenu($container)
 {
     $view = new Zend_View();
     return $view->navigation($container)->menu();
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:5,代码来源:NavMenu.php


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