diff --git a/module/VuFind/src/VuFind/Controller/SummonController.php b/module/VuFind/src/VuFind/Controller/SummonController.php index 46755025b995765c316907f13e67544ce854e8ed..cc85443b0dece8862e0d960344983abc408b31d0 100644 --- a/module/VuFind/src/VuFind/Controller/SummonController.php +++ b/module/VuFind/src/VuFind/Controller/SummonController.php @@ -28,7 +28,7 @@ namespace VuFind\Controller; use VuFind\Cache\Manager as CacheManager, VuFind\Search\Summon\Params as SummonParams, - VuFind\Search\Summon\Results as SummonResults; + VuFind\Search\Summon\Results as SummonResults, Zend\Mvc\MvcEvent; /** * Summon Controller @@ -49,13 +49,34 @@ class SummonController extends AbstractSearch { $this->searchClassId = 'Summon'; $this->useResultScroller = false; - /* TODO - $this->view->layout()->poweredBy - = 'Powered by Summonâ„¢ from Serials Solutions, a division of ProQuest.'; - */ parent::__construct(); } + /** + * preDispatch -- block access when appropriate. + * + * @param MvcEvent $e Event object + * + * @return void + */ + public function preDispatch(MvcEvent $e) + { + $this->layout()->poweredBy + = 'Powered by Summonâ„¢ from Serials Solutions, a division of ProQuest.'; + } + + /** + * Register the default events for this controller + * + * @return void + */ + protected function attachDefaultListeners() + { + parent::attachDefaultListeners(); + $events = $this->getEventManager(); + $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 1000); + } + /** * Handle an advanced search * diff --git a/module/VuFind/src/VuFind/Controller/SummonrecordController.php b/module/VuFind/src/VuFind/Controller/SummonrecordController.php index 486677a63e0e42ee687a4833152b9323fa91eaa4..d6f8e825f18deda8605459092f29c8fc071b665e 100644 --- a/module/VuFind/src/VuFind/Controller/SummonrecordController.php +++ b/module/VuFind/src/VuFind/Controller/SummonrecordController.php @@ -26,6 +26,7 @@ * @link http://vufind.org Main Site */ namespace VuFind\Controller; +use Zend\Mvc\MvcEvent; /** * Summon Record Controller @@ -48,12 +49,33 @@ class SummonrecordController extends AbstractRecord $this->searchClassId = 'Summon'; $this->useResultScroller = false; $this->defaultTab = 'Description'; - /* TODO - $this->view->layout()->poweredBy - = 'Powered by Summonâ„¢ from Serials Solutions, a division of ProQuest.'; - */ // Call standard record controller initialization: parent::__construct(); } + + /** + * preDispatch -- block access when appropriate. + * + * @param MvcEvent $e Event object + * + * @return void + */ + public function preDispatch(MvcEvent $e) + { + $this->layout()->poweredBy + = 'Powered by Summonâ„¢ from Serials Solutions, a division of ProQuest.'; + } + + /** + * Register the default events for this controller + * + * @return void + */ + protected function attachDefaultListeners() + { + parent::attachDefaultListeners(); + $events = $this->getEventManager(); + $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 1000); + } }