From fe83eb8eed482fa083046840c9d34d0fd0d2e62a Mon Sep 17 00:00:00 2001 From: Luka Stocker Date: Wed, 13 Sep 2023 10:22:14 +0200 Subject: [PATCH] Setup: 37755, add component factory to environment. --- .../Setup/class.ilComponentInstallPluginObjective.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php b/Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php index 29e2f86cc09f..19369841a7d5 100644 --- a/Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php +++ b/Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php @@ -95,7 +95,7 @@ public function achieve(Setup\Environment $environment): Setup\Environment ); } - $ORIG_DIC = $this->initEnvironment($environment, $component_repository); + $ORIG_DIC = $this->initEnvironment($environment, $component_repository, $component_factory); $plugin = $component_factory->getPlugin($info->getId()); $plugin->install(); $plugin->update(); @@ -115,13 +115,15 @@ public function isApplicable(Setup\Environment $environment): bool return !$plugin->isInstalled(); } - protected function initEnvironment(Setup\Environment $environment, \ilComponentRepository $component_repository) - { + protected function initEnvironment( + Setup\Environment $environment, + \ilComponentRepository $component_repository, + ilComponentFactory $component_factory + ) { $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE); $plugin_admin = $environment->getResource(Setup\Environment::RESOURCE_PLUGIN_ADMIN); $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI); $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI); - $component_factory = $environment->getResource(Setup\Environment::RESOURCE_COMPONENT_FACTORY); // ATTENTION: This is a total abomination. It only exists to allow various // sub components of the various readers to run. This is a memento to the