From 8ad02d5344b78a9b0470c83743ea3900b0425b75 Mon Sep 17 00:00:00 2001 From: Rob Allen Date: Tue, 17 Jan 2012 21:28:56 +0000 Subject: [PATCH] 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\! --- module/Application/config/module.config.php | 5 +++++ 1 file changed, 5 insertions(+) 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', -- 1.7.10.4