From 0d2703f976fe678739bf62d9da43a4bbbece609a Mon Sep 17 00:00:00 2001 From: Dorian Merz <merz@ub.uni-leipzig.de> Date: Wed, 24 Feb 2021 10:50:58 +0100 Subject: [PATCH] refs #19209 [fid] make MyResearchControllerFactory more generic * can now produce objects from sub class of fid's MyResearchController --- module/fid/src/Controller/MyResearchControllerFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/fid/src/Controller/MyResearchControllerFactory.php b/module/fid/src/Controller/MyResearchControllerFactory.php index ebdec5ec36f..73c81142a0d 100644 --- a/module/fid/src/Controller/MyResearchControllerFactory.php +++ b/module/fid/src/Controller/MyResearchControllerFactory.php @@ -39,11 +39,11 @@ class MyResearchControllerFactory return null; } - public function __invoke(ContainerInterface $container) + public function __invoke(ContainerInterface $container, $requested_name) { /** @var ServiceManager $serviceManager */ $serviceManager = $container->get(ServiceManager::class); - $controller = new MyResearchController($serviceManager); + $controller = new $requested_name($serviceManager); $controller->setFidClient($container->get(Client::class)); return $controller; -- GitLab