久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <small id='VJL6D'></small><noframes id='VJL6D'>

      <legend id='VJL6D'><style id='VJL6D'><dir id='VJL6D'><q id='VJL6D'></q></dir></style></legend>
    1. <tfoot id='VJL6D'></tfoot>
        <bdo id='VJL6D'></bdo><ul id='VJL6D'></ul>
    2. <i id='VJL6D'><tr id='VJL6D'><dt id='VJL6D'><q id='VJL6D'><span id='VJL6D'><b id='VJL6D'><form id='VJL6D'><ins id='VJL6D'></ins><ul id='VJL6D'></ul><sub id='VJL6D'></sub></form><legend id='VJL6D'></legend><bdo id='VJL6D'><pre id='VJL6D'><center id='VJL6D'></center></pre></bdo></b><th id='VJL6D'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='VJL6D'><tfoot id='VJL6D'></tfoot><dl id='VJL6D'><fieldset id='VJL6D'></fieldset></dl></div>

        如何擴展 Zend Navigation Menu View Helper?

        How do I extend the Zend Navigation Menu View Helper?(如何擴展 Zend Navigation Menu View Helper?)
      1. <small id='z04j6'></small><noframes id='z04j6'>

      2. <i id='z04j6'><tr id='z04j6'><dt id='z04j6'><q id='z04j6'><span id='z04j6'><b id='z04j6'><form id='z04j6'><ins id='z04j6'></ins><ul id='z04j6'></ul><sub id='z04j6'></sub></form><legend id='z04j6'></legend><bdo id='z04j6'><pre id='z04j6'><center id='z04j6'></center></pre></bdo></b><th id='z04j6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='z04j6'><tfoot id='z04j6'></tfoot><dl id='z04j6'><fieldset id='z04j6'></fieldset></dl></div>
        <legend id='z04j6'><style id='z04j6'><dir id='z04j6'><q id='z04j6'></q></dir></style></legend>
          <bdo id='z04j6'></bdo><ul id='z04j6'></ul>

          <tfoot id='z04j6'></tfoot>

                <tbody id='z04j6'></tbody>
                  本文介紹了如何擴展 Zend Navigation Menu View Helper?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我需要更改Zend_View_Helper_Navigation_Menu 的輸出.我找到了需要修改的兩個函數,并且知道如何進行所需的更改.我不知道如何讓 Navigation 對象使用我的視圖助手而不是 Zend .

                  I need to change the output of Zend_View_Helper_Navigation_Menu. I've found the two functions that I'll need to modify, and I know how to make the changes I need. What I don't know is how to make the Navigation object use my view helper instead of the Zend one.

                  代表我的類擴展的代碼片段:

                  Code snippet representing my class extension:

                  // file /library/My/View/Helper/Navigation/Menu.php
                  class My_View_Helper_Navigation_Menu extends Zend_View_Helper_Navigation_Menu
                  {
                      protected function _renderDeepestMenu(Zend_Navigation_Container $container,
                                                            $ulClass,
                                                            $indent,
                                                            $minDepth,
                                                            $maxDepth)
                      {
                          // modified code here
                      }
                  
                      protected function _renderMenu(Zend_Navigation_Container $container,
                                                     $ulClass,
                                                     $indent,
                                                     $minDepth,
                                                     $maxDepth,
                                                     $onlyActive)
                      {
                          // modified code here
                      }
                  }
                  

                  <小時>

                  編輯以澄清

                  我想更改

                1. 元素的類并刪除 EOL 和縮進.菜單視圖腳本沒有選項可以做到這一點,這就是我必須擴展它的原因.

                  I want to change the class of the <li> elements and remove the EOL and indentation. There are no options to do that with the menu view script, which is why I'll have to extend it.

                  在我的 Bootstrap 中初始化導航對象:

                  Initializing the navigation object in my Bootstrap:

                  $navTable = new Default_Model_Site_DbTable_Navigation();
                  $view = $this->getResource('view');
                  $view->navigation(new Zend_Navigation($navTable->getNavigation()));
                  

                  在我的布局中渲染菜單:

                  Rendering the menu in my layout:

                  echo $this->navigation()->menu();
                  

                  <小時>

                  解決方案

                  我通過如下重命名使其工作,但我不清楚為什么我不能重載/覆蓋 _Menu 類和 menu() 函數.

                  I got it working by renaming things as follows, but I am not clear on why I can't overload/overwrite the _Menu class and menu() function.

                  1. 將類名更改為My_View_Helper_Navigation_MyMenu
                  2. 在類中添加myMenu函數(return parent::menu($container);)
                  3. 在布局中調用echo $this->navigation()->myMenu();

                  類線框:

                  // file /library/My/View/Helper/Navigation/MyMenu.php
                  class My_View_Helper_Navigation_MyMenu extends Zend_View_Helper_Navigation_Menu
                  {
                      public function myMenu(Zend_Navigation_Container $container = null)
                      {
                          return parent::menu($container);
                      }
                  
                      protected function _renderDeepestMenu(Zend_Navigation_Container $container,
                                                            $ulClass,
                                                            $indent,
                                                            $minDepth,
                                                            $maxDepth)
                      {
                          // modified code here
                      }
                  
                      protected function _renderMenu(Zend_Navigation_Container $container,
                                                     $ulClass,
                                                     $indent,
                                                     $minDepth,
                                                     $maxDepth,
                                                     $onlyActive)
                      {
                          // modified code here
                      }
                  }
                  

                  推薦答案

                     $view->addHelperPath(
                        APPLICATION_ROOT . '/library/MyApp/View/Helper/Navigation',
                        'MyApp_View_Helper_'
                        );
                  
                  
                  echo $this->navigation()->myMenu(); // name of your class
                  

                  來自:讓 Zend_Navigation 菜單工作使用 jQuery 的魚眼

                  編輯

                  抱歉,我沒有看到您的解決方案,這正是我發布的內容.

                  Sorry I've not seen your solution, it is exactly what I've posted.

                  但為什么這不是菜單類的真正擴展?

                  But why this is not a trully extension of menu class?

                  這篇關于如何擴展 Zend Navigation Menu View Helper?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!
                2. 相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                      <bdo id='caIux'></bdo><ul id='caIux'></ul>

                            <tbody id='caIux'></tbody>
                        • <small id='caIux'></small><noframes id='caIux'>

                        • <legend id='caIux'><style id='caIux'><dir id='caIux'><q id='caIux'></q></dir></style></legend>
                        • <i id='caIux'><tr id='caIux'><dt id='caIux'><q id='caIux'><span id='caIux'><b id='caIux'><form id='caIux'><ins id='caIux'></ins><ul id='caIux'></ul><sub id='caIux'></sub></form><legend id='caIux'></legend><bdo id='caIux'><pre id='caIux'><center id='caIux'></center></pre></bdo></b><th id='caIux'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='caIux'><tfoot id='caIux'></tfoot><dl id='caIux'><fieldset id='caIux'></fieldset></dl></div>
                          <tfoot id='caIux'></tfoot>
                          • 主站蜘蛛池模板: 亚洲aⅴ| 国产精品视频一区二区三区 | 日韩视频―中文字幕 | 一区二区三区国产在线观看 | 国产一区在线免费观看 | 日韩在线精品视频 | 成人激情视频网 | 国产精品国产三级国产aⅴ中文 | 中文字幕免费在线 | 久久精品电影 | 免费在线视频一区二区 | 亚洲精品日韩在线 | 在线一区二区三区 | 久久久久久黄 | 日韩中文字幕在线视频 | 久久久夜色精品亚洲 | 欧美一级在线观看 | 久久aⅴ乱码一区二区三区 91综合网 | 国产99久久久国产精品 | 精品久久久久久亚洲综合网 | 亚洲精品一区二区网址 | 一区在线播放 | 一级a性色生活片久久毛片波多野 | 精品无码久久久久久国产 | 中文字幕成人av | 国产乱码精品一区二区三区av | 亚洲视频中文字幕 | 综合二区| 久久久男人的天堂 | 中文字幕亚洲精品 | 超碰3| 日皮视频免费 | 成人小视频在线 | 亚洲精品一区二区三区蜜桃久 | 中文字幕 国产 | 亚洲人成免费 | 日韩在线一区二区三区 | 亚洲 欧美 在线 一区 | 日韩av中文| 在线免费中文字幕 | 国产高清视频 |