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

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 
- Public Member Functions inherited from ilSetupObjective
 __construct (Setup\Config $config)
 

Additional Inherited Members

- Protected Attributes inherited from ilSetupObjective
Setup Config $config
 

Detailed Description

Definition at line 23 of file class.ilInstIdDefaultStoredObjective.php.

Member Function Documentation

◆ achieve()

ilInstIdDefaultStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 47 of file class.ilInstIdDefaultStoredObjective.php.

References ILIAS\Setup\Environment\getResource().

47  : Setup\Environment
48  {
49  $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
50  $settings = $factory->settingsFor("common");
51 
52  $settings->set("inst_id", "0");
53 
54  return $environment;
55  }
+ Here is the call graph for this function:

◆ getHash()

ilInstIdDefaultStoredObjective::getHash ( )

Definition at line 25 of file class.ilInstIdDefaultStoredObjective.php.

25  : string
26  {
27  return hash("sha256", self::class);
28  }

◆ getLabel()

ilInstIdDefaultStoredObjective::getLabel ( )

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

30  : string
31  {
32  return "Store default installation id.";
33  }

◆ getPreconditions()

ilInstIdDefaultStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 40 of file class.ilInstIdDefaultStoredObjective.php.

40  : array
41  {
42  return [
43  new \ilSettingsFactoryExistsObjective()
44  ];
45  }

◆ isApplicable()

ilInstIdDefaultStoredObjective::isApplicable ( Setup\Environment  $environment)

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

60  : bool
61  {
62  $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
63  $settings = $factory->settingsFor("common");
64 
65  return !(bool) $settings->get("inst_id");
66  }

◆ isNotable()

ilInstIdDefaultStoredObjective::isNotable ( )

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

35  : bool
36  {
37  return false;
38  }

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