How can I get in ZF2 the current (selected) module name in the application layout? Purpose: My application layout include the main menu of the zf2 app, and every time a modu
I prefer easier way without dealing with Module.php
Module.php
Place this code into layout.phtml
$routeName = $this->getHelperPluginManager()->getServiceLocator()->get('Application') ->getMvcEvent()->getRouteMatch()->getMatchedRouteName(); if($routeName === "users") ...