Skip to content

Commit

Permalink
Setup: 37755, add component factory to environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastocker committed Sep 13, 2023
1 parent 7c4b299 commit fe83eb8
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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
Expand Down

0 comments on commit fe83eb8

Please sign in to comment.