ZF2-463: Zend\Navigation\Container::addPage does not inject RouteMatch or Router
Description
If you create a Zend\Navigation\Navigation using the DefaultNavigationFactory, the Router and RouteMatch are automatically injected into every MVC page.
However, if you subsequently add MVC pages to the Navigation using the Navigation::addPage method, the Router and RouteMatch are not injected for you. You can set a default router on Zend\Navigation\Page\Mvc, but you have to set the RouteMatch manually every time.
Would you please consider making one of the following modifications:
Change Zend\Navigation\Page\Mvc so you can specify a default RouteMatch as well as a default Router.
Change Zend\Navigation\AbstractContainer so that it automatically injects the Router and RouteMatch on every call to addPage.
Many thanks!
Comments
Posted by Frank Brückner (frosch) on 2012-09-18T20:54:02.000+0000
I think your first suggestion is a good idea.
Posted by Ralph Schindler (ralph) on 2012-10-08T20:14:59.000+0000
This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2525