ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSetupConfigStoredObjective Class Reference
+ Inheritance diagram for ilSetupConfigStoredObjective:
+ Collaboration diagram for ilSetupConfigStoredObjective:

Public Member Functions

 __construct (Setup\Config $config)
 
 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.ilSetupConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilSetupConfigStoredObjective::__construct ( Setup\Config  $config)

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

References ILIAS\GlobalScreen\Provider\__construct().

27  {
29  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ achieve()

ilSetupConfigStoredObjective::achieve ( Setup\Environment  $environment)

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

References $ini.

53  : Setup\Environment
54  {
55  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
56 
57  $ini->setVariable("server", "absolute_path", dirname(__DIR__, 2));
58  $ini->setVariable(
59  "server",
60  "timezone",
61  $this->config->getServerTimeZone()->getName()
62  );
63 
64  $ini->setVariable("clients", "default", (string) $this->config->getClientId());
65 
66  if (!$ini->write()) {
67  throw new Setup\UnachievableException("Could not write ilias.ini.php");
68  }
69 
70  return $environment;
71  }
$ini
Definition: raiseError.php:4

◆ getHash()

ilSetupConfigStoredObjective::getHash ( )

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

31  : string
32  {
33  return hash("sha256", self::class);
34  }

◆ getLabel()

ilSetupConfigStoredObjective::getLabel ( )

Definition at line 36 of file class.ilSetupConfigStoredObjective.php.

36  : string
37  {
38  return "Fill ini with common settings";
39  }

◆ getPreconditions()

ilSetupConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 46 of file class.ilSetupConfigStoredObjective.php.

46  : array
47  {
48  return [
50  ];
51  }

◆ isApplicable()

ilSetupConfigStoredObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 76 of file class.ilSetupConfigStoredObjective.php.

References $ini.

76  : bool
77  {
78  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
79 
80  return
81  $ini->readVariable("server", "absolute_path") !== dirname(__DIR__, 2) ||
82  $ini->readVariable("server", "timezone") !== $this->config->getServerTimeZone()->getName() ||
83  $ini->readVariable("clients", "default") !== (string) $this->config->getClientId()
84  ;
85  }
$ini
Definition: raiseError.php:4

◆ isNotable()

ilSetupConfigStoredObjective::isNotable ( )

Definition at line 41 of file class.ilSetupConfigStoredObjective.php.

41  : bool
42  {
43  return false;
44  }

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