ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilCourseObjectiveSetupAgent Class Reference
+ Inheritance diagram for ilCourseObjectiveSetupAgent:
+ Collaboration diagram for ilCourseObjectiveSetupAgent:

Public Member Functions

 getUpdateObjective (?Config $config=null)
 Get the goal the agent wants to achieve on update. More...
 
 getStatusObjective (Metrics\Storage $storage)
 
 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...
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getMigrations ()
 Get a named map of migrations available for this Agent. More...
 
 hasConfig ()
 Does this agent require a configuration? 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

Definition at line 29 of file ilCourseObjectiveSetupAgent.php.

Member Function Documentation

◆ getArrayToConfigTransformation()

ilCourseObjectiveSetupAgent::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 51 of file ilCourseObjectiveSetupAgent.php.

52 {
53 throw new LogicException('Agent has no config.');
54 }
A transformation is a function from one datatype to another.

◆ getBuildObjective()

ilCourseObjectiveSetupAgent::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 61 of file ilCourseObjectiveSetupAgent.php.

61 : Objective
62 {
63 return new Objective\NullObjective();
64 }
A non-objective, nothing to do to achieve it...
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31

◆ getInstallObjective()

ilCourseObjectiveSetupAgent::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 ilCourseObjectiveSetupAgent.php.

56 : Objective
57 {
58 return new Objective\NullObjective();
59 }

◆ getMigrations()

ilCourseObjectiveSetupAgent::getMigrations ( )

Get a named map of migrations available for this Agent.

Should also return Migrations that have run completely.

Returns
array<string,Migration>|Migration[]

Implements ILIAS\Setup\Agent.

Definition at line 66 of file ilCourseObjectiveSetupAgent.php.

◆ getStatusObjective()

ilCourseObjectiveSetupAgent::getStatusObjective ( Metrics\Storage  $storage)

Definition at line 42 of file ilCourseObjectiveSetupAgent.php.

42 : Objective
43 {
44 return new ObjectiveCollection(
45 'Database is updated for component/ILIAS/Course',
46 true,
48 );
49 }
A objective collection is a objective that is achieved once all subobjectives are achieved.
This class attempt to achieve a set of database update steps.

◆ getUpdateObjective()

ilCourseObjectiveSetupAgent::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 33 of file ilCourseObjectiveSetupAgent.php.

33 : Objective
34 {
35 return new ObjectiveCollection(
36 'Database is updated for component/ILIAS/Course',
37 false,
39 );
40 }

◆ hasConfig()

ilCourseObjectiveSetupAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 73 of file ilCourseObjectiveSetupAgent.php.

73 : bool
74 {
75 return false;
76 }

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