ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilBackgroundTasksSetupAgent.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
5 use ILIAS\Setup;
7 use ILIAS\Data;
8 use ILIAS\UI;
9 
10 class ilBackgroundTasksSetupAgent implements Setup\Agent
11 {
15  protected $refinery;
16 
17  public function __construct(
19  ) {
20  $this->refinery = $refinery;
21  }
22 
26  public function hasConfig() : bool
27  {
28  return true;
29  }
30 
34  public function getConfigInput(Setup\Config $config = null) : UI\Component\Input\Field\Input
35  {
36  throw new \LogicException("Not yet implemented.");
37  }
38 
43  {
44  return $this->refinery->custom()->transformation(function ($data) {
45  return new \ilBackgroundTasksSetupConfig(
47  $data["max_number_of_concurrent_tasks"] ?? 1
48  );
49  });
50  }
51 
55  public function getInstallObjective(Setup\Config $config = null) : Setup\Objective
56  {
57  return new Setup\ObjectiveCollection(
58  "Complete objectives from Services/BackgroundTasks",
59  false,
61  );
62  }
63 
67  public function getUpdateObjective(Setup\Config $config = null) : Setup\Objective
68  {
69  return new Setup\NullObjective();
70  }
71 
75  public function getBuildArtifactObjective() : Setup\Objective
76  {
77  return new Setup\NullObjective();
78  }
79 }
Class Factory.
$data
Definition: storeScorm.php:23
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:14
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68
Builds data types.
Definition: Factory.php:19
getInstallObjective(Setup\Config $config=null)
A transformation is a function from one datatype to another.
A configuration for the setup.
Definition: Config.php:10