/**
* Inject a template into the view model, if none present
*
* Template is derived from the controller found in the route match, and,
* optionally, the action, if present.
*
* @param MvcEvent $e
* @return void
*/
public function injectTemplate(MvcEvent $e)
{
$routeMatch = $e->getRouteMatch();
$controller = $e->getTarget();
if (is_object($controller)) {
$controller = get_class($controller);
}
if (!$controller) {
$controller = $routeMatch->getParam('controller', '');
}
if (strpos($controller, 'Ctrl\\Module') !== 0) {
return;
}
parent::injectTemplate($e);
}