Permalink
Browse files

Add back in controller variable

  • Loading branch information...
1 parent b1f4c18 commit 7ea227deca716ee96196df2e33a188781568d063 @EvanDotPro committed Sep 14, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 Module.php
View
@@ -6,7 +6,8 @@ class Module
public function onBootstrap($e)
{
$e->getApplication()->getEventManager()->getSharedManager()->attach('Zend\Mvc\Controller\AbstractActionController', 'dispatch', function($e) {
- $controllerClass = get_class($e->getTarget());
+ $controller = $e->getTarget();
+ $controllerClass = get_class($controller);
$moduleNamespace = substr($controllerClass, 0, strpos($controllerClass, '\\'));
$config = $e->getApplication()->getServiceManager()->get('config');
if (isset($config['module_layouts'][$moduleNamespace])) {

0 comments on commit 7ea227d

Please sign in to comment.