I want to gather some info from modules. How can I do that?
For example. I want to create module “menu”. Within that module I want to create ability to add new menu item which will have such fields as router name and params.
module “menu” should get info about all available routers and params from some kind of API of all module. I mean, if user select “create news” he should be able to open list of the news, click on the selected news and menu item with link to that news will be created.
What pattern should I use in such case?
If you use zend-navigation then you can add the related pages in the configuration of your modules. The configuration of all modules are merged and you will get a complete and ready-to-use navigation container. No additional code is needed.
1 Like
I was thinking about creating of some kind of my own event and create listeners on this event. I will check zend-navigation. Thank you!