ILIAS  release_8 Revision v8.23
ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent Class Reference
+ Inheritance diagram for ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent:
+ Collaboration diagram for ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent:

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. More...
 
 getInstallObjective (Config $config=null)
 Get the goals the agent wants to achieve on setup. More...
 
 getBuildArtifactObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getStatusObjective (Metrics\Storage $storage)
 
 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...
 
 getUpdateObjective (Setup\Config $config=null)
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 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...
 

Protected Member Functions

 getOrgUnitObjectives ()
 

Detailed Description

Author
Nicolas Schaefli nick@.nosp@m.flux.nosp@m.labs..nosp@m.ch

Definition at line 35 of file class.ilEmployeeTalkSetupAgent.php.

Member Function Documentation

◆ getArrayToConfigTransformation()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::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 42 of file class.ilEmployeeTalkSetupAgent.php.

42  : Transformation
43  {
44  throw new \LogicException(
45  self::class . " has no config."
46  );
47  }

◆ getBuildArtifactObjective()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::getBuildArtifactObjective ( )

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 54 of file class.ilEmployeeTalkSetupAgent.php.

54  : Objective
55  {
56  return new Objective\NullObjective();
57  }

◆ getInstallObjective()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::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 49 of file class.ilEmployeeTalkSetupAgent.php.

49  : Objective
50  {
51  return new \ilTreeAdminNodeAddedObjective('tala', '__TalkTemplateAdministration');
52  }

◆ getMigrations()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::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 64 of file class.ilEmployeeTalkSetupAgent.php.

64  : array
65  {
66  return [];
67  }

◆ getNamedObjectives()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::getNamedObjectives ( ?Config  $config = null)

Gets all named objectives The keys of the returned array are the commands.

Only the AgentCollection should return an array where the cmd of the named objective is the array key.

Parameters
Config | null$config
Returns
array<string|int, ObjectiveConstructor>

Implements ILIAS\Setup\Agent.

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

69  : array
70  {
71  return [];
72  }

◆ getOrgUnitObjectives()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::getOrgUnitObjectives ( )
protected

Definition at line 86 of file class.ilEmployeeTalkSetupAgent.php.

References $objectives, ilOrgUnitOperationContext\CONTEXT_ETAL, ilOrgUnitOperationContext\CONTEXT_OBJECT, ilOrgUnitOperation\OP_CREATE_EMPLOYEE_TALK, ilOrgUnitOperation\OP_EDIT_EMPLOYEE_TALK, and ilOrgUnitOperation\OP_READ_EMPLOYEE_TALK.

Referenced by ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent\getUpdateObjective().

86  : array
87  {
88  $objectives = [];
89 
90  $objectives[] = new \ilOrgUnitOperationContextRegisteredObjective(
93  );
94 
95  $objectives[] = new \ilOrgUnitOperationRegisteredObjective(
97  'Read Employee Talk',
99  );
100 
101  $objectives[] = new \ilOrgUnitOperationRegisteredObjective(
103  'Create Employee Talk',
105  );
106 
107  $objectives[] = new \ilOrgUnitOperationRegisteredObjective(
109  'Edit Employee Talk (not only own)',
111  );
112 
113  return $objectives;
114  }
$objectives
+ Here is the caller graph for this function:

◆ getStatusObjective()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::getStatusObjective ( Metrics\Storage  $storage)

Definition at line 59 of file class.ilEmployeeTalkSetupAgent.php.

59  : Objective
60  {
61  return new Objective\NullObjective();
62  }

◆ getUpdateObjective()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::getUpdateObjective ( Setup\Config  $config = null)

Definition at line 75 of file class.ilEmployeeTalkSetupAgent.php.

References ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent\getOrgUnitObjectives().

75  : Setup\Objective
76  {
77  return new Setup\ObjectiveCollection(
78  'Employee Talks',
79  true,
80  new \ilTreeAdminNodeAddedObjective('tala', '__TalkTemplateAdministration'),
81  new \ilDatabaseUpdateStepsExecutedObjective(new ilEmployeeTalkDBUpdateSteps()),
82  ...$this->getOrgUnitObjectives()
83  );
84  }
+ Here is the call graph for this function:

◆ hasConfig()

ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 37 of file class.ilEmployeeTalkSetupAgent.php.

37  : bool
38  {
39  return false;
40  }

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