Created
December 16, 2013 01:41
-
-
Save raphaeldealmeida/7981181 to your computer and use it in GitHub Desktop.
Alterar template apenas dentro do módulo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MeuModulo; | |
use Zend\ModuleManager\ModuleManager; | |
class Module{ | |
public function init(ModuleManager $moduleManager){ | |
$sharedEvents = $moduleManager->getEventManager() | |
->getSharedManager(); | |
$sharedEvents->attach(__NAMESPACE__, | |
'dispatch', | |
function($e) { | |
$controller = $e->getTarget(); | |
$controller->layout('layout/meuModuloLayout'); | |
}, | |
100 | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment