ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilVersionWrittenToSettingsObjective Class Reference
+ Inheritance diagram for ilVersionWrittenToSettingsObjective:
+ Collaboration diagram for ilVersionWrittenToSettingsObjective:

Public Member Functions

 __construct (Data\Factory $data_factory)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 

Data Fields

const ILIAS_VERSION_KEY = "ilias_version"
 

Protected Attributes

Data Factory $data_factory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilVersionWrittenToSettingsObjective::__construct ( Data\Factory  $data_factory)

Definition at line 30 of file class.ilVersionWrittenToSettingsObjective.php.

References $data_factory.

31  {
32  $this->data_factory = $data_factory;
33  }

Member Function Documentation

◆ achieve()

ilVersionWrittenToSettingsObjective::achieve ( Setup\Environment  $environment)

Definition at line 60 of file class.ilVersionWrittenToSettingsObjective.php.

References ILIAS\Setup\Environment\getResource(), and ILIAS_VERSION_NUMERIC.

60  : Setup\Environment
61  {
62  $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
63  $settings = $factory->settingsFor("common");
64 
65  $current_version = $this->data_factory->version(ILIAS_VERSION_NUMERIC);
66  $settings->set(self::ILIAS_VERSION_KEY, (string) $current_version);
67 
68  return $environment;
69  }
const ILIAS_VERSION_NUMERIC
+ Here is the call graph for this function:

◆ getHash()

ilVersionWrittenToSettingsObjective::getHash ( )

Definition at line 35 of file class.ilVersionWrittenToSettingsObjective.php.

35  : string
36  {
37  return hash(
38  "sha256",
39  get_class($this)
40  );
41  }

◆ getLabel()

ilVersionWrittenToSettingsObjective::getLabel ( )

Definition at line 43 of file class.ilVersionWrittenToSettingsObjective.php.

43  : string
44  {
45  return "The ILIAS Version is written to the settings.";
46  }

◆ getPreconditions()

ilVersionWrittenToSettingsObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 53 of file class.ilVersionWrittenToSettingsObjective.php.

53  : array
54  {
55  return [
57  ];
58  }

◆ isApplicable()

ilVersionWrittenToSettingsObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 71 of file class.ilVersionWrittenToSettingsObjective.php.

71  : bool
72  {
73  return true;
74  }

◆ isNotable()

ilVersionWrittenToSettingsObjective::isNotable ( )

Definition at line 48 of file class.ilVersionWrittenToSettingsObjective.php.

48  : bool
49  {
50  return true;
51  }

Field Documentation

◆ $data_factory

Data Factory ilVersionWrittenToSettingsObjective::$data_factory
protected

Definition at line 28 of file class.ilVersionWrittenToSettingsObjective.php.

Referenced by __construct().

◆ ILIAS_VERSION_KEY

const ilVersionWrittenToSettingsObjective::ILIAS_VERSION_KEY = "ilias_version"

The documentation for this class was generated from the following file: