zendframework/zf2 — pull request #2033 by arse (2012-07-28 13:38:11+00:00)
Title: get root service locator instead of plugin manager sl

When called from the view, the navigation helper is trying to create a Navigation object with the plugin manager service locator instead of the root service locator and failing miserably. i've added code to use the root service locator. a check has had to be inserted to determine if the sl is the "root" sl to allow the navigation output to be constructed inside the controller if necessary.

e.g. inside the controller this will correctly output a nav
```
$n = $this->getServiceLocator()->create('Navigation');
$foo = new \Zend\View\Helper\Navigation\Menu();
$foo->setContainer($n);
$foo->setView(new \Zend\View\Renderer\PhpRenderer());
$menu = $foo->render();

// and inside a view file this will now correctly output an html menu:
echo $this->navigation('Navigation')->menu();
```