ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\User\Setup\Agent Class Reference
+ Inheritance diagram for ILIAS\User\Setup\Agent:
+ Collaboration diagram for ILIAS\User\Setup\Agent:

Public Member Functions

 __construct (private readonly array $user_settings_contributions, private readonly array $user_custom_profile_fields, private readonly array $user_field_attributes_change_listeners)
 
 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 (?Setup\Config $config=null)
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getUpdateObjective (?Setup\Config $config=null)
 
 getStatusObjective (Setup\Metrics\Storage $storage)
 
 getMigrations ()
 Get a named map of migrations available for this Agent. More...
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
- Public Member Functions inherited from ILIAS\Setup\Agent\NullAgent
 __construct (Refinery $refinery)
 
 hasConfig ()
 @inheritdocs More...
 
 getArrayToConfigTransformation ()
 @inheritdocs More...
 
 getInstallObjective (?Config $config=null)
 @inheritdocs More...
 
 getUpdateObjective (?Config $config=null)
 @inheritdocs More...
 
 getBuildObjective ()
 @inheritdocs More...
 
 getStatusObjective (Metrics\Storage $storage)
 @inheritdocs More...
 
 getMigrations ()
 @inheritDoc More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. 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...
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Setup\Agent\NullAgent
Refinery $refinery
 

Detailed Description

Definition at line 33 of file Agent.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\User\Setup\Agent::__construct ( private readonly array  $user_settings_contributions,
private readonly array  $user_custom_profile_fields,
private readonly array  $user_field_attributes_change_listeners 
)

Definition at line 37 of file Agent.php.

41 {
42 }

Member Function Documentation

◆ getArrayToConfigTransformation()

ILIAS\User\Setup\Agent::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 49 of file Agent.php.

49 : Transformation
50 {
51 throw new LogicException(self::class . ' has no Config.');
52 }

◆ getBuildObjective()

ILIAS\User\Setup\Agent::getBuildObjective ( )

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

Exceptions
InvalidArgumentExceptionif Config does not match the Agent.

Reimplemented from ILIAS\StaticURL\SetupAgent.

Definition at line 65 of file Agent.php.

65 : Objective
66 {
67 return new ObjectiveCollection(
68 'Updates for User',
69 false,
70 new CollectSettingsObjective($this->user_settings_contributions),
71 new CollectTypesObjective($this->user_custom_profile_fields),
72 new CollectListenersObjective($this->user_field_attributes_change_listeners)
73 );
74 }

◆ getInstallObjective()

ILIAS\User\Setup\Agent::getInstallObjective ( ?Setup\Config  $config = null)

Definition at line 54 of file Agent.php.

54 : Setup\Objective
55 {
56 return new ObjectiveCollection(
57 'Updates for User',
58 false,
59 new CollectSettingsObjective($this->user_settings_contributions),
60 new CollectTypesObjective($this->user_custom_profile_fields),
61 new CollectListenersObjective($this->user_field_attributes_change_listeners)
62 );
63 }

◆ getMigrations()

ILIAS\User\Setup\Agent::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 98 of file Agent.php.

98 : array
99 {
100 return [
101 new MigrateNewAccountAttachments(),
102 new UserProfileMigrations()
103 ];
104 }

◆ getStatusObjective()

ILIAS\User\Setup\Agent::getStatusObjective ( Setup\Metrics\Storage  $storage)

Definition at line 90 of file Agent.php.

90 : Setup\Objective
91 {
92 return new \ilDatabaseUpdateStepsMetricsCollectedObjective(
93 $storage,
94 new DBUpdateSteps11()
95 );
96 }

◆ getUpdateObjective()

ILIAS\User\Setup\Agent::getUpdateObjective ( ?Setup\Config  $config = null)

Definition at line 76 of file Agent.php.

76 : Setup\Objective
77 {
78 return new ObjectiveCollection(
79 'Updates for User',
80 false,
82 new DBUpdateSteps11()
83 ),
84 new CollectSettingsObjective($this->user_settings_contributions),
85 new CollectTypesObjective($this->user_custom_profile_fields),
86 new CollectListenersObjective($this->user_field_attributes_change_listeners)
87 );
88 }
This class attempt to achieve a set of database update steps.

◆ hasConfig()

ILIAS\User\Setup\Agent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 44 of file Agent.php.

44 : bool
45 {
46 return false;
47 }

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