ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilPluginDefaultAgent Class Reference
+ Inheritance diagram for ilPluginDefaultAgent:
+ Collaboration diagram for ilPluginDefaultAgent:

Public Member Functions

 __construct (string $plugin_name)
 
 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 (?Setup\Config $config=null)
 
 getUpdateObjective (?Setup\Config $config=null)
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts.
Exceptions
InvalidArgumentExceptionif Config does not match the Agent.
More...
 
 getStatusObjective (Setup\Metrics\Storage $storage)
 
 getMigrations ()
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 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...
 
 getStatusObjective (Metrics\Storage $storage)
 Get the objective to be achieved when status is requested. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 

Protected Attributes

string $plugin_name
 

Detailed Description

Definition at line 24 of file class.ilPluginDefaultAgent.php.

Constructor & Destructor Documentation

◆ __construct()

ilPluginDefaultAgent::__construct ( string  $plugin_name)

Definition at line 30 of file class.ilPluginDefaultAgent.php.

References $plugin_name.

31  {
32  $this->plugin_name = $plugin_name;
33  }

Member Function Documentation

◆ getArrayToConfigTransformation()

ilPluginDefaultAgent::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 46 of file class.ilPluginDefaultAgent.php.

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

◆ getBuildObjective()

ilPluginDefaultAgent::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 82 of file class.ilPluginDefaultAgent.php.

82  : Setup\Objective
83  {
84  return new Setup\Objective\NullObjective();
85  }

◆ getInstallObjective()

ilPluginDefaultAgent::getInstallObjective ( ?Setup\Config  $config = null)

Definition at line 54 of file class.ilPluginDefaultAgent.php.

54  : Setup\Objective
55  {
56  return new Setup\ObjectiveCollection(
57  'Complete objectives from Services/Component',
58  false,
59  new ilComponentInstallPluginObjective($this->plugin_name),
60  new ilComponentUpdatePluginObjective($this->plugin_name),
61  new ilComponentActivatePluginsObjective($this->plugin_name)
62  );
63  }

◆ getMigrations()

ilPluginDefaultAgent::getMigrations ( )

Implements ILIAS\Setup\Agent.

Definition at line 98 of file class.ilPluginDefaultAgent.php.

98  : array
99  {
100  return [];
101  }

◆ getStatusObjective()

ilPluginDefaultAgent::getStatusObjective ( Setup\Metrics\Storage  $storage)

Definition at line 90 of file class.ilPluginDefaultAgent.php.

90  : Setup\Objective
91  {
92  return new Setup\Objective\NullObjective();
93  }

◆ getUpdateObjective()

ilPluginDefaultAgent::getUpdateObjective ( ?Setup\Config  $config = null)

Definition at line 68 of file class.ilPluginDefaultAgent.php.

68  : Setup\Objective
69  {
70  return new Setup\ObjectiveCollection(
71  'Complete objectives from Services/Component',
72  false,
73  new ilComponentUpdatePluginObjective($this->plugin_name),
74  new ilComponentActivatePluginsObjective($this->plugin_name),
75  new ilPluginLanguageUpdatedObjective($this->plugin_name)
76  );
77  }

◆ hasConfig()

ilPluginDefaultAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 38 of file class.ilPluginDefaultAgent.php.

38  : bool
39  {
40  return false;
41  }

Field Documentation

◆ $plugin_name

string ilPluginDefaultAgent::$plugin_name
protected

Definition at line 28 of file class.ilPluginDefaultAgent.php.

Referenced by __construct().


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