ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilEmployeeTalkSetupAgent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\Setup;
31
36{
37 public function hasConfig(): bool
38 {
39 return false;
40 }
41
43 {
44 throw new \LogicException(
45 self::class . " has no config."
46 );
47 }
48
49 public function getInstallObjective(?Config $config = null): Objective
50 {
51 return new \ilTreeAdminNodeAddedObjective('tala', '__TalkTemplateAdministration');
52 }
53
54 public function getBuildObjective(): Objective
55 {
56 return new Objective\NullObjective();
57 }
58
59 public function getStatusObjective(Metrics\Storage $storage): Objective
60 {
61 return new \ilDatabaseUpdateStepsMetricsCollectedObjective($storage, new ilEmployeeTalkDBUpdateSteps());
62 }
63
64 public function getMigrations(): array
65 {
66 return [];
67 }
68
69 public function getNamedObjectives(?Config $config = null): array
70 {
71 return [];
72 }
73
74
75 public function getUpdateObjective(?Setup\Config $config = null): Setup\Objective
76 {
78 'Employee Talks',
79 true,
80 new \ilTreeAdminNodeAddedObjective('tala', '__TalkTemplateAdministration'),
82 ...$this->getOrgUnitObjectives()
83 );
84 }
85
86 protected function getOrgUnitObjectives(): 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 }
115}
getMigrations()
Get a named map of migrations available for this Agent.
getNamedObjectives(?Config $config=null)
Gets all named objectives The keys of the returned array are the commands.
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A transformation is a function from one datatype to another.
A agent is some component that performs part of the setup process.
Definition: Agent.php:30
A configuration for the setup.
Definition: Config.php:27
A migration is a potentially long lasting operation that can be broken into discrete steps.
Definition: Migration.php:29
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$objectives