ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilLanguageSetupAgent.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 use ILIAS\Setup;
23 use ILIAS\Refinery;
24 use ILIAS\UI;
25 
27 {
29 
30  protected Refinery\Factory $refinery;
31  protected \ilSetupLanguage $il_setup_language;
32 
33  public function __construct(
34  Refinery\Factory $refinery,
35  \ilSetupLanguage $il_setup_language
36  ) {
37  $this->refinery = $refinery;
38  $this->il_setup_language = $il_setup_language;
39  }
40 
44  public function hasConfig(): bool
45  {
46  return false;
47  }
48 
53  {
54  throw new LogicException(self::class . " has no Config.");
55  }
56 
60  public function getInstallObjective(Setup\Config $config = null): Setup\Objective
61  {
62  return new Setup\ObjectiveCollection(
63  "Complete objectives from components/ILIAS/Language",
64  false,
65  new ilLanguagesInstalledAndUpdatedObjective($this->il_setup_language),
67  );
68  }
69 
73  public function getUpdateObjective(Setup\Config $config = null): Setup\Objective
74  {
75  return new Setup\ObjectiveCollection(
76  "Complete objectives from components/ILIAS/Language",
77  false,
78  new ilLanguagesInstalledAndUpdatedObjective($this->il_setup_language),
79  );
80  }
81 
85  public function getBuildObjective(): Setup\Objective
86  {
87  return new Setup\Objective\NullObjective();
88  }
89 
93  public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
94  {
95  return new ilLanguageMetricsCollectedObjective($storage, $this->il_setup_language);
96  }
97 
101  public function getMigrations(): array
102  {
103  return [];
104  }
105 }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
getInstallObjective(Setup\Config $config=null)
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.if Agent has no Config ...
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.if Config does not match the Agent...
language handling for setup
A agent is some component that performs part of the setup process.
Definition: Agent.php:29
hasConfig()
Does this agent require a configuration?
__construct(Refinery\Factory $refinery, \ilSetupLanguage $il_setup_language)
Builds data types.
Definition: Factory.php:35
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A transformation is a function from one datatype to another.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getStatusObjective(Setup\Metrics\Storage $storage)
A configuration for the setup.
Definition: Config.php:26
getUpdateObjective(Setup\Config $config=null)