ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilPrivacySecuritySetupAgent.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 use ILIAS\Setup;
22 use ILIAS\Refinery;
23 use ILIAS\UI;
24 
25 class ilPrivacySecuritySetupAgent implements Setup\Agent
26 {
28 
32  protected Refinery\Factory $refinery;
33 
34  public function __construct(Refinery\Factory $refinery)
35  {
36  $this->refinery = $refinery;
37  }
38 
42  public function hasConfig(): bool
43  {
44  return true;
45  }
46 
50  public function getConfigInput(Setup\Config $config = null): UI\Component\Input\Container\Form\FormInput
51  {
52  throw new LogicException("Not yet implemented.");
53  }
54 
59  {
60  return $this->refinery->custom()->transformation(function ($data) {
62  (bool) ($data["https_enabled"] ?? false),
63  (isset($data["auth_duration"])) ? (int) $data["auth_duration"] : null,
64  (isset($data["account_assistance_duration"])) ? (int) $data["account_assistance_duration"] : null
65  );
66  });
67  }
68 
72  public function getInstallObjective(Setup\Config $config = null): Setup\Objective
73  {
74  return new Setup\ObjectiveCollection(
75  "Complete objectives from Services/PrivacySecurity",
76  false,
78  );
79  }
80 
84  public function getUpdateObjective(Setup\Config $config = null): Setup\Objective
85  {
86  if ($config === null || $config instanceof Setup\NullConfig) {
87  return new Setup\Objective\NullObjective();
88  }
89 
90  return $this->getInstallObjective($config);
91  }
92 
96  public function getBuildArtifactObjective(): Setup\Objective
97  {
98  return new Setup\Objective\NullObjective();
99  }
100 
104  public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
105  {
106  return new Setup\Objective\NullObjective();
107  }
108 
112  public function getMigrations(): array
113  {
114  return [];
115  }
116 }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getStatusObjective(Setup\Metrics\Storage $storage)
getInstallObjective(Setup\Config $config=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A transformation is a function from one datatype to another.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A configuration for the setup.
Definition: Config.php:26
A configuration with no content.
Definition: NullConfig.php:26