diff --git a/module/VuFind/src/VuFind/Controller/ChannelsController.php b/module/VuFind/src/VuFind/Controller/ChannelsController.php index aabf652d711..b692a1756dc 100644 --- a/module/VuFind/src/VuFind/Controller/ChannelsController.php +++ b/module/VuFind/src/VuFind/Controller/ChannelsController.php @@ -29,6 +29,7 @@ namespace VuFind\Controller; +use Laminas\ServiceManager\ServiceLocatorInterface; use VuFind\ChannelProvider\ChannelLoader; /** @@ -54,11 +55,14 @@ class ChannelsController extends AbstractBase /** * Constructor * - * @param ChannelLoader $loader Channel loader + * @param ChannelLoader $loader Channel loader + * @param ServiceLocatorInterface $sm Top-level service manager (needed for + * some AbstractBase behavior) */ - public function __construct(ChannelLoader $loader) + public function __construct(ChannelLoader $loader, ServiceLocatorInterface $sm) { $this->loader = $loader; + parent::__construct($sm); } /** diff --git a/module/VuFind/src/VuFind/Controller/ChannelsControllerFactory.php b/module/VuFind/src/VuFind/Controller/ChannelsControllerFactory.php index 69c77cf37e3..023ccbe1f36 100644 --- a/module/VuFind/src/VuFind/Controller/ChannelsControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/ChannelsControllerFactory.php @@ -68,6 +68,6 @@ public function __invoke( throw new \Exception('Unexpected options sent to factory.'); } $loader = $container->get(\VuFind\ChannelProvider\ChannelLoader::class); - return $this->applyPermissions($container, new $requestedName($loader)); + return $this->applyPermissions($container, new $requestedName($loader, $container)); } }