-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing retrieval of a specific router #22846
Comments
If you really need a component specific router, |
Thanks mbabker, I said "all the components" since a made a var_dump of the result of getRouter with XDebug and saw there all component routers, not just core router. |
When you dump an instance of
Any user should never need to dig into the router internals and explicitly retrieve a specific component router and manually build URLs. Any call to |
Thanks mbabker. I am closing this issue for now and will investigate in other components hooking to core Joomla router. |
Is your feature request related to a problem? Please describe.
Currently JFactory::getApplication()->getRouter() returns ALL the routers registered in the application, it should be called getRouters().
I didnt find a clean way to retrieve the router associated to a specific component, to invoke its method like building a SEF according to that component.
Describe the solution you'd like
Either having a way to invoke getRouter with the component name like getRouter(string componentName) or another function, since I think we don't want to change name of getRouter() into getRouters() for backward compatibility
Additional context
Joomla 3.8.x
The text was updated successfully, but these errors were encountered: