In a very old post I told you how to get the route name in custom view helper with zf2 – Zend Framework 2. In this post I used the ServiceLocator, a thing which was some kind of deprecated in later versions of zf2. It is bad practice to use such a construct like the getServiceLocator method, because e.g. applications …
zf2 – Get the route name in a custom view helper
======================== IMPORTANT UPDATE: this is a very old post – find a better way in my post “zf2/zf3 – get the route name in a custom view helper” ======================== Ever tried to get the route name in your custom view helper in a zf2 (zend framework 2.1) project? I searched a lot – until I realized that I have …