ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilEventHandlingDefinitionsStoredObjective.php
Go to the documentation of this file.
1<?php
2
19use ILIAS\Setup;
20use ILIAS\DI;
21
23{
28
29 public function __construct(bool $populate_before = true)
30 {
31 $this->populate_before = $populate_before;
32 }
33
37 public function getHash(): string
38 {
39 return hash("sha256", self::class);
40 }
41
45 public function getLabel(): string
46 {
47 return "Events are initialized.";
48 }
49
53 public function isNotable(): bool
54 {
55 return true;
56 }
57
61 public function getPreconditions(Setup\Environment $environment): array
62 {
63 return [
64 new \ilDatabaseUpdatedObjective(),
65 new \ilSettingsFactoryExistsObjective(),
66 new \ilComponentDefinitionsStoredObjective()
67 ];
68 }
69
73 public function achieve(Setup\Environment $environment): Setup\Environment
74 {
75 $reader = new \ilComponentDefinitionReader(
77 );
78 $reader->purge();
79 $reader->readComponentDefinitions();
80
81 return $environment;
82 }
83
87 public function isApplicable(Setup\Environment $environment): bool
88 {
89 return true;
90 }
91}
An environment holds resources to be used in the setup process.
Definition: Environment.php:28
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...
Definition: Container.php:19
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...