From: Rob Allen Date: Tue, 17 Jan 2012 21:28:56 +0000 (+0000) Subject: Inject the PluginBroker into the ActionController so that we pick up any module's... X-Git-Url: http://git.inspyration.org/?p=zf2.biz%2Fgalerie.git;a=commitdiff_plain;h=8ad02d5344b78a9b0470c83743ea3900b0425b75 Inject the PluginBroker into the ActionController so that we pick up any module's controller plugins that they have injected into it. By injecting into ActionController, all controllers that extend it will automatically pick up this injection without having to inject themselves which of course saves a lot of typing for developers and stops them wondering why a given plugin isn't working in a particular controller\! --- diff --git a/module/Application/config/module.config.php b/module/Application/config/module.config.php index 4d5eef9..a8e8365 100644 --- a/module/Application/config/module.config.php +++ b/module/Application/config/module.config.php @@ -9,6 +9,11 @@ return array( 'error' => 'Application\Controller\ErrorController', 'view' => 'Zend\View\PhpRenderer', ), + 'Zend\Mvc\Controller\ActionController' => array( + 'parameters' => array( + 'broker' => 'Zend\Mvc\Controller\PluginBroker', + ), + ), 'Zend\View\PhpRenderer' => array( 'parameters' => array( 'resolver' => 'Zend\View\TemplatePathStack',