Hi,

just another Navigation question :)

I want to replace the menu helper of \Zend\View\Helper\Navigation with my own 
implementation which outputs me the correct html for 
twitters bootstrap menus.

I narrowed it down to:

    public function getViewHelperConfig()
    {
         return array(
             'factories' => array(
                 'navigation' => function(HelperPluginManager $pm) {
                    $helper = new \Zend\View\Helper\Navigation;

                    $pluginManager = new 
\Zend\View\Helper\Navigation\PluginManager();
                    $pluginManager->setInvokableClass('menu', 
'Zend\View\Helper\Navigation\Menubootstrap');

                    $helper->setServiceLocator($pm->getServiceLocator());
                    $helper->setPluginManager($pluginManager);

                    return $helper;
                 }
             )
         );
    }

It works as intented if I set the key for 'menu' direct in 
\Zend\View\Helper\Navigation\PluginManager(), but not if I set it with the 
factory above.
I´ll always get:

Fatal error: Call to a member function plugin() on a non-object in D:\Zend 
Server\Apache2\htdocs\komplex\vendor\Zend2\View\Helper\AbstractHtmlElement.php 
on line 74

I know that the class doesn´t belong in that folder, its there to eliminate the 
possibility of path errors and will go to the correct path after that. :)

Greetings and thx in advance

Marc aka G0re



--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to