ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilStyleSetupAgent.php
Go to the documentation of this file.
1<?php
2
19use ILIAS\Setup;
21use ILIAS\Data;
22use ILIAS\UI;
23
25{
26 use Setup\Agent\HasNoNamedObjective;
27
31 protected $refinery;
32
33 public function __construct(
35 ) {
36 $this->refinery = $refinery;
37 }
38
42 public function hasConfig(): bool
43 {
44 return true;
45 }
46
51 {
52 return $this->refinery->custom()->transformation(function ($data) {
53 return new \ilStyleSetupConfig(
54 $data["manage_system_styles"] ?? false,
55 $data["path_to_scss"] ?? null
56 );
57 });
58 }
59
63 public function getInstallObjective(?Setup\Config $config = null): Setup\Objective
64 {
65 return new ilStyleConfigStoredObjective($config);
66 }
67
71 public function getUpdateObjective(?Setup\Config $config = null): Setup\Objective
72 {
73 if ($config !== null) {
74 return new ilStyleConfigStoredObjective($config);
75 }
77 }
78
83 {
85 }
86
90 public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
91 {
92 return new ilStyleMetricsCollectedObjective($storage);
93 }
94
98 public function getMigrations(): array
99 {
100 return [
102 ];
103 }
104
105 public function getNamedObjectives(?Setup\Config $config = null): array
106 {
107 return [
108 'buildUIFrameworkExampleTestCases.update' => new Setup\ObjectiveConstructor(
109 'builds an import file for testrail for all KNOWN ids.',
111 ),
112
113 'buildUIFrameworkExampleTestCases.new' => new Setup\ObjectiveConstructor(
114 'builds an import file for testrail with ONLY NEW cases.',
116 ),
117
118
119 ];
120 }
121}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
A non-objective, nothing to do to achieve it...
getUpdateObjective(?Setup\Config $config=null)
getInstallObjective(?Setup\Config $config=null)
getNamedObjectives(?Setup\Config $config=null)
getStatusObjective(Setup\Metrics\Storage $storage)
__construct(Refinery\Factory $refinery)
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
Storage is simple key/value store without further schema definition.
Definition: Storage.php:30
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...