ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilEmployeeTalkSetupAgent.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\EmployeeTalk\Setup;
22 
24 use ILIAS\Setup;
31 
35 final class ilEmployeeTalkSetupAgent implements Setup\Agent
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  {
77  return new Setup\ObjectiveCollection(
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 }
A objective collection is a objective that is achieved once all subobjectives are achieved...
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
A agent is some component that performs part of the setup process.
Definition: Agent.php:29
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$objectives
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 configuration for the setup.
Definition: Config.php:26