ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilUICoreSetupAgent.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /* Copyright (c) 2021 Thibeau Fuhrer <thf@studer-raimann.ch> Extended GPL, see docs/LICENSE */
6 
15 
21 class ilUICoreSetupAgent implements Agent
22 {
26  public function hasConfig(): bool
27  {
28  return false;
29  }
30 
35  {
36  throw new LogicException(self::class . " has no Config.");
37  }
38 
42  public function getInstallObjective(Config $config = null): Objective
43  {
44  return new NullObjective();
45  }
46 
50  public function getUpdateObjective(Config $config = null): Objective
51  {
54  );
55  }
56 
61  {
62  return new ObjectiveCollection(
63  'buildIlCtrlArtifacts',
64  false,
68  );
69  }
70 
74  public function getStatusObjective(Storage $storage): Objective
75  {
76  return new NullObjective();
77  }
78 
82  public function getMigrations(): array
83  {
84  return [];
85  }
86 
90  public function getNamedObjectives(?Config $config = null): array
91  {
92  return [
93  'buildIlCtrlArtifacts' => new ObjectiveConstructor(
94  'builds all necessary ilCtrl artifacts.',
95  function () {
96  return $this->getBuildArtifactObjective();
97  }
98  ),
99 
100  'updateIlCtrlDatabase' => new ObjectiveConstructor(
101  'executes all ilCtrl database update steps.',
102  function () {
103  return $this->getUpdateObjective();
104  }
105  ),
106  ];
107  }
108 }
A objective collection is a objective that is achieved once all subobjectives are achieved...
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
hasConfig()
Does this agent require a configuration?
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
getUpdateObjective(Config $config=null)
Get the goal the agent wants to achieve on update.The provided configuration is to be used to change ...
A agent is some component that performs part of the setup process.
Definition: Agent.php:29
A non-objective, nothing to do to achieve it...
Class ilCtrlSecurityArtifactObjective.
getBuildArtifactObjective()
Get the goal the agent wants to achieve to build artifacts.if Config does not match the Agent...
Class ilCtrlDatabaseUpdateSteps holds the database update- steps affecting ilCtrl tables...
getStatusObjective(Storage $storage)
Class ilCtrlStructureArtifactObjective.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getInstallObjective(Config $config=null)
Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set acc...
getNamedObjectives(?Config $config=null)
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.if Agent has no Config ...
A transformation is a function from one datatype to another.
A configuration for the setup.
Definition: Config.php:26
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...