title: KnpMenuBundle, keep Main Menu active even for sub actions
body: <p>my question is related to the following, 
  is this the "proper" way or is there a better solution ?</p>
  
  <p><a href="https://stackoverflow.com/questions/14674820/symfony2-knpmenubundle-set-active-a-menu-item-even-when-its-not-on-that-menu">Symfony2 KnpMenuBundle: set active a menu item even when its not on that menu</a></p>
  
  <p>Thats my current code:</p>
  
  <pre><code>public function mainMenu(FactoryInterface $factory, array $options)
  {
      $menu = $factory-&gt;createItem('root');
      $menu-&gt;setChildrenAttributes(array('class' =&gt; 'nav navbar-nav'));
      $menu-&gt;addChild('Home',
          array('route' =&gt; 'home'
      ));
      $menu-&gt;addChild('Producers',
          array(
          'route' =&gt; 'producers_show'
      ));
      $menu-&gt;addChild('Ships',
          array(
              'route' =&gt; 'ships_show'
          ));
  
      /* not working */
         $request = $this-&gt;container-&gt;get('request');
         $routeName = $request-&gt;get('_route');
         switch ($routeName)
         {
  
             case 'producer_create':
             case 'ship_create':
                   $menu-&gt;setCurrent(true);
             break;
         }
  
      return $menu;
  }
  </code></pre>
  
  <p>The Rendered HTML Looks like the following for the route "ship/create"</p>
  
  <pre><code>&lt;ul class="nav navbar-nav"&gt;
      &lt;li class="first"&gt;        
          &lt;a href="/app_dev.php/"&gt;Home&lt;/a&gt;        
      &lt;/li&gt;
      &lt;li&gt;        
           &lt;a href="/app_dev.php/producers"&gt;Producers&lt;/a&gt;        
      &lt;/li&gt;
      &lt;li class="last"&gt;        
           &lt;a href="/app_dev.php/ships"&gt;Ships&lt;/a&gt;        
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>As you can see, nothing is set 'active'
  Do I have to add the sub actions such as create update delete to the Menu either, and hide them ??
  How do I solve this issue please?</p>