Issues

ZF2-463: Zend\Navigation\Container::addPage does not inject RouteMatch or Router

Issue Type: Improvement Created: 2012-08-12T11:04:52.000+0000 Last Updated: 2012-10-08T20:14:59.000+0000 Status: Closed Fix version(s): Reporter: Steve Talbot (stevetalbot) Assignee: Frank Brückner (frosch) Tags: - Zend\Navigation

Related issues: Attachments:

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:

  1. Change Zend\Navigation\Page\Mvc so you can specify a default RouteMatch as well as a default Router.
  2. 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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts