ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilUtilitiesConfigStoredObjective Class Reference

Stores configuration for the Utilities service (paths to various tools) in the according ini-fields. More...

+ Inheritance diagram for ilUtilitiesConfigStoredObjective:
+ Collaboration diagram for ilUtilitiesConfigStoredObjective:

Public Member Functions

 __construct (\ilUtilitiesSetupConfig $config)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 

Protected Attributes

 $config
 

Detailed Description

Stores configuration for the Utilities service (paths to various tools) in the according ini-fields.

Definition at line 11 of file class.ilUtilitiesConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilUtilitiesConfigStoredObjective::__construct ( \ilUtilitiesSetupConfig  $config)

Member Function Documentation

◆ achieve()

ilUtilitiesConfigStoredObjective::achieve ( Setup\Environment  $environment)

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

47 : Setup\Environment
48 {
49 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
50
51 $ini->setVariable("tools", "convert", $this->config->getPathToConvert());
52 $ini->setVariable("tools", "zip", $this->config->getPathToZip());
53 $ini->setVariable("tools", "unzip", $this->config->getPathToUnzip());
54
55 if (!$ini->write()) {
56 throw new Setup\UnachievableException("Could not write ilias.ini.php");
57 }
58
59 return $environment;
60 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilUtilitiesConfigStoredObjective::getHash ( )

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

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

◆ getLabel()

ilUtilitiesConfigStoredObjective::getLabel ( )

Definition at line 29 of file class.ilUtilitiesConfigStoredObjective.php.

29 : string
30 {
31 return "Store configuration of Services/Utilities";
32 }

◆ getPreconditions()

ilUtilitiesConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 39 of file class.ilUtilitiesConfigStoredObjective.php.

39 : array
40 {
41 $common_config = $environment->getConfigFor("common");
42 return [
43 new ilIniFilesPopulatedObjective($common_config)
44 ];
45 }

◆ isNotable()

ilUtilitiesConfigStoredObjective::isNotable ( )

Definition at line 34 of file class.ilUtilitiesConfigStoredObjective.php.

34 : bool
35 {
36 return false;
37 }

Field Documentation

◆ $config

ilUtilitiesConfigStoredObjective::$config
protected

Definition at line 16 of file class.ilUtilitiesConfigStoredObjective.php.

Referenced by __construct().


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