ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilUICoreSetupAgent Class Reference

Class ilUICoreSetupAgent. More...

+ Inheritance diagram for ilUICoreSetupAgent:
+ Collaboration diagram for ilUICoreSetupAgent:

Public Member Functions

 hasConfig ()
 Does this agent require a configuration? More...
 
 getArrayToConfigTransformation ()
 Agents must be able to tell how to create a configuration from a nested array.
Exceptions
LogicExceptionif Agent has no Config
More...
 
 getInstallObjective (?Config $config=null)
 Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set according configuration values in the installation.
Exceptions
InvalidArgumentExceptionif Config does not match the Agent..
More...
 
 getUpdateObjective (?Config $config=null)
 Get the goal the agent wants to achieve on update.The provided configuration is to be used to change according configuration values in the installation. If this is not possible for some reason, an according UnachievableException needs to be thrown in the according objective.The configuration is not to be used to initialize the required environment for the objectives. This must be done via ClientIdReadObjective and depending objectives like ilIniFilesLoadedObjective.If no configuration is provided the configuration of the component should stay as is.
Exceptions
InvalidArgumentExceptionif Config does not match the Agent..
More...
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts.
Exceptions
InvalidArgumentExceptionif Config does not match the Agent.
More...
 
 getStatusObjective (Storage $storage)
 
 getMigrations ()
 @inheritDoc More...
 
 getNamedObjectives (?Config $config=null)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 hasConfig ()
 Does this agent require a configuration? More...
 
 getArrayToConfigTransformation ()
 Agents must be able to tell how to create a configuration from a nested array. More...
 
 getInstallObjective (?Config $config=null)
 Get the goals the agent wants to achieve on setup. More...
 
 getUpdateObjective (?Config $config=null)
 Get the goal the agent wants to achieve on update. More...
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getStatusObjective (Metrics\Storage $storage)
 Get the objective to be achieved when status is requested. More...
 
 getMigrations ()
 Get a named map of migrations available for this Agent. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 

Detailed Description

Member Function Documentation

◆ getArrayToConfigTransformation()

ilUICoreSetupAgent::getArrayToConfigTransformation ( )

Agents must be able to tell how to create a configuration from a nested array.

Exceptions
LogicExceptionif Agent has no Config

Implements ILIAS\Setup\Agent.

Definition at line 48 of file class.ilUICoreSetupAgent.php.

49 {
50 throw new LogicException(self::class . " has no Config.");
51 }
A transformation is a function from one datatype to another.

◆ getBuildObjective()

ilUICoreSetupAgent::getBuildObjective ( )

Get the goal the agent wants to achieve to build artifacts.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent.

Implements ILIAS\Setup\Agent.

Definition at line 74 of file class.ilUICoreSetupAgent.php.

74 : Objective
75 {
76 return new ObjectiveCollection(
77 'buildIlCtrlArtifacts',
78 false,
82 );
83 }
A objective collection is a objective that is achieved once all subobjectives are achieved.
Class ilCtrlSecurityArtifactObjective.
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31

Referenced by getNamedObjectives().

+ Here is the caller graph for this function:

◆ getInstallObjective()

ilUICoreSetupAgent::getInstallObjective ( ?Config  $config = null)

Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set according configuration values in the installation.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent..

Implements ILIAS\Setup\Agent.

Definition at line 56 of file class.ilUICoreSetupAgent.php.

56 : Objective
57 {
58 return new NullObjective();
59 }
A non-objective, nothing to do to achieve it...

◆ getMigrations()

ilUICoreSetupAgent::getMigrations ( )

@inheritDoc

Implements ILIAS\Setup\Agent.

Definition at line 96 of file class.ilUICoreSetupAgent.php.

96 : array
97 {
98 return [];
99 }

◆ getNamedObjectives()

ilUICoreSetupAgent::getNamedObjectives ( ?Config  $config = null)

@inheritDoc

Implements ILIAS\Setup\Agent.

Definition at line 104 of file class.ilUICoreSetupAgent.php.

104 : 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 }
getUpdateObjective(?Config $config=null)
Get the goal the agent wants to achieve on update.The provided configuration is to be used to change ...
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.

References getBuildObjective(), and getUpdateObjective().

+ Here is the call graph for this function:

◆ getStatusObjective()

ilUICoreSetupAgent::getStatusObjective ( Storage  $storage)

Definition at line 88 of file class.ilUICoreSetupAgent.php.

88 : Objective
89 {
90 return new NullObjective();
91 }

◆ getUpdateObjective()

ilUICoreSetupAgent::getUpdateObjective ( ?Config  $config = null)

Get the goal the agent wants to achieve on update.The provided configuration is to be used to change according configuration values in the installation. If this is not possible for some reason, an according UnachievableException needs to be thrown in the according objective.The configuration is not to be used to initialize the required environment for the objectives. This must be done via ClientIdReadObjective and depending objectives like ilIniFilesLoadedObjective.If no configuration is provided the configuration of the component should stay as is.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent..

Implements ILIAS\Setup\Agent.

Definition at line 64 of file class.ilUICoreSetupAgent.php.

64 : Objective
65 {
68 );
69 }
Class ilCtrlDatabaseUpdateSteps holds the database update- steps affecting ilCtrl tables.
This class attempt to achieve a set of database update steps.

Referenced by getNamedObjectives().

+ Here is the caller graph for this function:

◆ hasConfig()

ilUICoreSetupAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 40 of file class.ilUICoreSetupAgent.php.

40 : bool
41 {
42 return false;
43 }

The documentation for this class was generated from the following file: