ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilBackgroundTasksSetupAgent.php
Go to the documentation of this file.
1<?php
2
20use ILIAS\Setup\Agent\HasNoNamedObjective;
28
30{
31 use HasNoNamedObjective;
32
33 public function __construct(protected Factory $refinery)
34 {
35 }
36
40 public function hasConfig(): bool
41 {
42 return true;
43 }
44
49 {
50 return $this->refinery->custom()->transformation(fn($data): \ilBackgroundTasksSetupConfig => new \ilBackgroundTasksSetupConfig(
52 $data["max_number_of_concurrent_tasks"] ?? 1
53 ));
54 }
55
59 public function getInstallObjective(?Config $config = null): Objective
60 {
63 }
64
68 public function getUpdateObjective(?Config $config = null): Objective
69 {
70 if ($config !== null) {
73 }
74 return new NullObjective();
75 }
76
80 public function getBuildObjective(): Objective
81 {
82 return new NullObjective();
83 }
84
88 public function getStatusObjective(Storage $storage): Objective
89 {
90 return new ObjectiveCollection(
91 'Component BackgroundTasks',
92 true,
95 );
96 }
97
101 public function getMigrations(): array
102 {
103 return [];
104 }
105}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
A objective collection is a objective that is achieved once all subobjectives are achieved.
A non-objective, nothing to do to achieve it...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set acc...
getUpdateObjective(?Config $config=null)
Get the goal the agent wants to achieve on update.The provided configuration is to be used to change ...
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
hasConfig()
Does this agent require a configuration?
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