title: Zend_Navigation extending Menu class
body: <h2>Issue</h2>
  
  <p>I really need to extend Zend_View_Helper_Navigation_Menu for my custom behaviour of its methods.
  I use modules if it's important for you to know.</p>
  
  <h2>Some solutions</h2>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/2364695/how-do-i-extend-the-zend-navigation-menu-view-helper">How do I extend the Zend Navigation Menu View Helper?</a></li>
  <li><a href="http://forums.zend.com/viewtopic.php?f=69&amp;t=5594" rel="nofollow noreferrer">http://forums.zend.com/viewtopic.php?f=69&amp;t=5594</a></li>
  <li><a href="http://www.virgentech.com/blog/2011/05/extending-navigation-view-helpers-zend-framework.html" rel="nofollow noreferrer">http://www.virgentech.com/blog/2011/05/extending-navigation-view-helpers-zend-framework.html</a></li>
  </ul>
  
  <h2>My problem</h2>
  
  <p>I've implemented all the solutions, their combinations and it still ends in failure... Guys, I am waiting for ANY hints.</p>
  
  <p><strong>Edit:</strong> The problem is that nothing happens. The standard helper is used (which works fine).</p>
  
  <h2>My code</h2>
  
  <p>My <em>Bootstrap.php</em> file:</p>
  
  <pre><code>protected function _initNavigation() {
      $this-&gt;bootstrap('view');
      $view = $this-&gt;getResource('view');
  
      $view-&gt;addHelperPath('/../library/Application/View/Helper/Navigation', 'Application_View_Helper_');     
      $view-&gt;navigation($this-&gt;doGetNavigation());
  }
  </code></pre>
  
  <p>My <code>Application_View_Helper_Navigation_Menu</code> class (<em>ROOT/library/Application/View/Helper/Navigation</em>):</p>
  
  <pre><code>class Application_View_Helper_Navigation_Menu extends Zend_View_Helper_Navigation_Menu
  {
      public function menu(Zend_Navigation_Container $container = null)
      {
          echo 'Application_View_Helper_Navigation_Menu::menu(...)';
          return parent::menu($container);
      }
  }
  </code></pre>
  
  <p>My <code>Zend_Debug::dump($this-&gt;getHelperPaths())</code> calling on view:</p>
  
  <pre><code>array (size=3)
      'Zend_View_Helper_' =&gt;
  array (size=1)
      0 =&gt; string 'Zend/View/Helper/' (length=17)
      'Application_View_Helper_' =&gt;
  array (size=1)
      0 =&gt; string '/../library/Application/View/Helper/Navigation/' (length=47)
      'Fleet_View_Helper_' =&gt;
  array (size=1)
      0 =&gt; string 'C:/repos/statistics/trunk/application/modules/fleet/views\helpers/' (length=70)
  </code></pre>
  
  <p>My script view:</p>
  
  <pre><code>echo $this-&gt;navigation()-&gt;menu();
  </code></pre>