Archive for August, 2011
The context of this is actually for ACL, where I wanted to determine whether a use can view the link or not. I have seen other people extend the URL View Helper to do this which kind of works, but it just means the entire <a> tag has to be produced by the helper rather than the URL. This didn’t sit too well with me, so I settled for wrapping the <a> in a IF block. Within my templates I only use the route name, i don’t pass through the module/controller/action params to the URL helper, as it means refactoring modules and controllers is much easier, if the need were to arise. Due to this, I needed to fetch the Module name, Controller Name and Action name from the Route name. Simple eh?
Continue reading “Zend Framework – Get The Module, Controller and Action by Route Name” »