ILIAS  release_8 Revision v8.24
class.ilUICoreSetupAgent.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5/* Copyright (c) 2021 Thibeau Fuhrer <thf@studer-raimann.ch> Extended GPL, see docs/LICENSE */
6
15
21class ilUICoreSetupAgent implements Agent
22{
26 public function hasConfig(): bool
27 {
28 return false;
29 }
30
35 {
36 throw new LogicException(self::class . " has no Config.");
37 }
38
43 {
44 return new NullObjective();
45 }
46
50 public function getUpdateObjective(Config $config = null): Objective
51 {
54 );
55 }
56
61 {
62 return new ObjectiveCollection(
63 'buildIlCtrlArtifacts',
64 false,
68 );
69 }
70
74 public function getStatusObjective(Storage $storage): Objective
75 {
76 return new NullObjective();
77 }
78
82 public function getMigrations(): array
83 {
84 return [];
85 }
86
90 public function getNamedObjectives(?Config $config = null): array
91 {
92 return [
93 'buildIlCtrlArtifacts' => new ObjectiveConstructor(
94 'builds all necessary ilCtrl artifacts.',
95 function () {
96 return $this->getBuildArtifactObjective();
97 }
98 ),
99
100 'updateIlCtrlDatabase' => new ObjectiveConstructor(
101 'executes all ilCtrl database update steps.',
102 function () {
103 return $this->getUpdateObjective();
104 }
105 ),
106 ];
107 }
108}
A objective collection is a objective that is achieved once all subobjectives are achieved.
A non-objective, nothing to do to achieve it...
Class ilCtrlDatabaseUpdateSteps holds the database update- steps affecting ilCtrl tables.
Class ilCtrlSecurityArtifactObjective.
This class attempt to achieve a set of database update steps.
Class ilUICoreSetupAgent.
hasConfig()
Does this agent require a configuration?
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
getUpdateObjective(Config $config=null)
Get the goal the agent wants to achieve on update.The provided configuration is to be used to change ...
getStatusObjective(Storage $storage)
getNamedObjectives(?Config $config=null)
@inheritDoc
getInstallObjective(Config $config=null)
Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set acc...
getBuildArtifactObjective()
Get the goal the agent wants to achieve to build artifacts.
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
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
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...