ILIAS  release_7 Revision v7.30-3-g800a261c036
ilSettingsFactoryExistsObjective Class Reference
+ Inheritance diagram for ilSettingsFactoryExistsObjective:
+ Collaboration diagram for ilSettingsFactoryExistsObjective:

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 

Detailed Description

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

Member Function Documentation

◆ achieve()

ilSettingsFactoryExistsObjective::achieve ( Setup\Environment  $environment)

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

References ILIAS\Setup\Environment\getResource().

31  : Setup\Environment
32  {
33  $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
34 
35  if (!($db instanceof \ilDBInterface)) {
36  throw new Setup\UnachievableException("Database does not exist.");
37  }
38 
39  return $environment
40  ->withResource(
41  Setup\Environment::RESOURCE_SETTINGS_FACTORY,
43  );
44  }
A factory that builds ilSettings that can be used for DI.
+ Here is the call graph for this function:

◆ getHash()

ilSettingsFactoryExistsObjective::getHash ( )

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

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

◆ getLabel()

ilSettingsFactoryExistsObjective::getLabel ( )

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

14  : string
15  {
16  return "Initialize factory for ilSetting";
17  }

◆ getPreconditions()

ilSettingsFactoryExistsObjective::getPreconditions ( Setup\Environment  $environment)

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

24  : array
25  {
26  return [
28  ];
29  }

◆ isApplicable()

ilSettingsFactoryExistsObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 49 of file class.ilSettingsFactoryExistsObjective.php.

49  : bool
50  {
51  $resource = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
52 
53  return !($resource instanceof ilSettingsFactory);
54  }
A factory that builds ilSettings that can be used for DI.

◆ isNotable()

ilSettingsFactoryExistsObjective::isNotable ( )

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

19  : bool
20  {
21  return false;
22  }

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