ILIAS  release_7 Revision v7.30-3-g800a261c036
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)
 @inheritDoc More...
 
- Public Member Functions inherited from ilSetupObjective
 __construct (\ilSetupConfig $config)
 

Additional Inherited Members

- Protected Attributes inherited from ilSetupObjective
 $config
 

Detailed Description

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

Member Function Documentation

◆ achieve()

ilInstIdDefaultStoredObjective::achieve ( Setup\Environment  $environment)

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

31 : Setup\Environment
32 {
33 $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
34 $settings = $factory->settingsFor("common");
35
36 $settings->set("inst_id", "0");
37
38 return $environment;
39 }
$factory
Definition: metadata.php:58

References $factory.

◆ getHash()

ilInstIdDefaultStoredObjective::getHash ( )

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

9 : string
10 {
11 return hash("sha256", self::class);
12 }

◆ getLabel()

ilInstIdDefaultStoredObjective::getLabel ( )

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

14 : string
15 {
16 return "Store default installation id.";
17 }

◆ getPreconditions()

ilInstIdDefaultStoredObjective::getPreconditions ( Setup\Environment  $environment)

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

24 : array
25 {
26 return [
27 new \ilSettingsFactoryExistsObjective()
28 ];
29 }

◆ isApplicable()

ilInstIdDefaultStoredObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

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

44 : bool
45 {
46 $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
47 $settings = $factory->settingsFor("common");
48
49 return !(bool) $settings->get("inst_id");
50 }

References $factory.

◆ isNotable()

ilInstIdDefaultStoredObjective::isNotable ( )

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

19 : bool
20 {
21 return false;
22 }

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