ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTreeSetupAgent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use ILIAS\Setup;
28use ILIAS\Refinery\Factory as Refinery;
30
31class ilTreeSetupAgent implements Agent
32{
34
36 {
37 $this->refinery = $refinery;
38 }
39
40 public function hasConfig(): bool
41 {
42 return false;
43 }
44
46 {
47 return $this->refinery->custom()->transformation(static function ($data): Config {
48 return new NullConfig();
49 });
50 }
51
52 public function getInstallObjective(?Config $config = null): Objective
53 {
54 return new Objective\NullObjective();
55 }
56
57 public function getUpdateObjective(?Config $config = null): Objective
58 {
60 }
61
62 public function getBuildObjective(): Objective
63 {
64 return new Objective\NullObjective();
65 }
66
67 public function getStatusObjective(Metrics\Storage $storage): Objective
68 {
70 'components/ILIAS/Tree',
71 true,
74 );
75 }
76
77 public function getMigrations(): array
78 {
79 return [];
80 }
81
82 public function getNamedObjectives(?Config $config = null): array
83 {
84 return [
85 'mp-to-ns' => new ObjectiveConstructor(
86 'Migrate the ILIAS repository tree from Materialized Path to Nested Set',
87 static function (): Objective {
90 );
91 }
92 ),
93 'ns-to-mp' => new ObjectiveConstructor(
94 'Migrate the ILIAS repository tree from Nested to Materialized Path',
95 static function (): Objective {
98 );
99 }
100 )
101 ];
102 }
103}
Builds data types.
Definition: Factory.php:36
A configuration with no content.
Definition: NullConfig.php:27
A objective collection is a objective that is achieved once all subobjectives are achieved.
A non-objective, nothing to do to achieve it...
This class attempt to achieve a set of database update steps.
__construct(Refinery $refinery)
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
hasConfig()
Does this agent require a configuration?
getNamedObjectives(?Config $config=null)
Gets all named objectives The keys of the returned array are the commands.
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.
getMigrations()
Get a named map of migrations available for this Agent.
getStatusObjective(Metrics\Storage $storage)
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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...