ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilUICoreSetupAgent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29
35class ilUICoreSetupAgent implements Agent
36{
40 public function hasConfig(): bool
41 {
42 return false;
43 }
44
49 {
50 throw new LogicException(self::class . " has no Config.");
51 }
52
56 public function getInstallObjective(?Config $config = null): Objective
57 {
58 return new NullObjective();
59 }
60
64 public function getUpdateObjective(?Config $config = null): Objective
65 {
68 );
69 }
70
74 public function getBuildObjective(): Objective
75 {
76 return new ObjectiveCollection(
77 'buildIlCtrlArtifacts',
78 false,
82 );
83 }
84
88 public function getStatusObjective(Storage $storage): Objective
89 {
90 return new NullObjective();
91 }
92
96 public function getMigrations(): array
97 {
98 return [];
99 }
100
104 public function getNamedObjectives(?Config $config = null): array
105 {
106 return [
107 'buildIlCtrlArtifacts' => new ObjectiveConstructor(
108 'builds all necessary ilCtrl artifacts.',
109 function () {
110 return $this->getBuildObjective();
111 }
112 ),
113
114 'updateIlCtrlDatabase' => new ObjectiveConstructor(
115 'executes all ilCtrl database update steps.',
116 function () {
117 return $this->getUpdateObjective();
118 }
119 ),
120 ];
121 }
122}
A objective collection is a objective that is achieved once all subobjectives are achieved.
A non-objective, nothing to do to achieve it...
Class ilCtrlDatabaseUpdateSteps holds the database update- steps affecting ilCtrl tables.
Class ilCtrlSecurityArtifactObjective.
This class attempt to achieve a set of database update steps.
Class ilUICoreSetupAgent.
getUpdateObjective(?Config $config=null)
Get the goal the agent wants to achieve on update.The provided configuration is to be used to change ...
hasConfig()
Does this agent require a configuration?
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set acc...
getStatusObjective(Storage $storage)
getNamedObjectives(?Config $config=null)
@inheritDoc
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
A transformation is a function from one datatype to another.
A agent is some component that performs part of the setup process.
Definition: Agent.php:30
A configuration for the setup.
Definition: Config.php:27
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31