ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilLanguageSetupAgent.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 use ILIAS\Setup;
22 use ILIAS\Refinery;
23 use ILIAS\UI;
24 
26 {
28 
29  protected Refinery\Factory $refinery;
30  protected \ilSetupLanguage $il_setup_language;
31 
32  public function __construct(
33  Refinery\Factory $refinery,
34  \ilSetupLanguage $il_setup_language
35  ) {
36  $this->refinery = $refinery;
37  $this->il_setup_language = $il_setup_language;
38  }
39 
43  public function hasConfig(): bool
44  {
45  return false;
46  }
47 
52  {
53  throw new LogicException(self::class . " has no Config.");
54  }
55 
59  public function getInstallObjective(?Setup\Config $config = null): Setup\Objective
60  {
61  return new Setup\ObjectiveCollection(
62  "Complete objectives from components/ILIAS/Language",
63  false,
64  new ilLanguagesInstalledAndUpdatedObjective($this->il_setup_language),
66  );
67  }
68 
72  public function getUpdateObjective(?Setup\Config $config = null): Setup\Objective
73  {
74  return new Setup\ObjectiveCollection(
75  "Complete objectives from components/ILIAS/Language",
76  false,
77  new ilLanguagesInstalledAndUpdatedObjective($this->il_setup_language),
78  );
79  }
80 
84  public function getBuildObjective(): Setup\Objective
85  {
86  return new Setup\Objective\NullObjective();
87  }
88 
92  public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
93  {
94  return new ilLanguageMetricsCollectedObjective($storage, $this->il_setup_language);
95  }
96 
100  public function getMigrations(): array
101  {
102  return [];
103  }
104 }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.if Agent has no Config ...
getInstallObjective(?Setup\Config $config=null)
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
getUpdateObjective(?Setup\Config $config=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
hasConfig()
Does this agent require a configuration?
Storage is simple key/value store without further schema definition.
Definition: Storage.php:29
__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