ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 25 of file class.ilPluginDefaultAgent.php.

Constructor & Destructor Documentation

◆ __construct()

ilPluginDefaultAgent::__construct ( string  $plugin_name)

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

References $plugin_name.

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

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

48  {
49  throw new LogicException(self::class . " has no Config.");
50  }
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 83 of file class.ilPluginDefaultAgent.php.

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

◆ getInstallObjective()

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

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

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

◆ getMigrations()

ilPluginDefaultAgent::getMigrations ( )

Implements ILIAS\Setup\Agent.

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

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

◆ getStatusObjective()

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

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

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

◆ getUpdateObjective()

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

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

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

◆ hasConfig()

ilPluginDefaultAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

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

39  : bool
40  {
41  return false;
42  }

Field Documentation

◆ $plugin_name

string ilPluginDefaultAgent::$plugin_name
protected

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

Referenced by __construct().


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