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

Public Member Functions

 __construct (\ilSetupConfig $config)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 @inheritDoc More...
 
 __construct (\ilSetupConfig $config)
 

Additional Inherited Members

- Protected Attributes inherited from ilSetupObjective
 $config
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilSetupConfigStoredObjective::__construct ( \ilSetupConfig  $config)

Reimplemented from ilSetupObjective.

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

12 {
14 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ilSetupObjective\$config, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ achieve()

ilSetupConfigStoredObjective::achieve ( Setup\Environment  $environment)

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

38 : Setup\Environment
39 {
40 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
41
42 $ini->setVariable("server", "absolute_path", dirname(__DIR__, 2));
43 $ini->setVariable(
44 "server",
45 "timezone",
46 $this->config->getServerTimeZone()->getName()
47 );
48
49 $ini->setVariable("clients", "default", $this->config->getClientId());
50
51 if (!$ini->write()) {
52 throw new Setup\UnachievableException("Could not write ilias.ini.php");
53 }
54
55 return $environment;
56 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilSetupConfigStoredObjective::getHash ( )

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

16 : string
17 {
18 return hash("sha256", self::class);
19 }

◆ getLabel()

ilSetupConfigStoredObjective::getLabel ( )

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

21 : string
22 {
23 return "Fill ini with common settings";
24 }

◆ getPreconditions()

ilSetupConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

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

31 : array
32 {
33 return [
35 ];
36 }

◆ isApplicable()

ilSetupConfigStoredObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

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

61 : bool
62 {
63 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
64
65 return
66 $ini->readVariable("server", "absolute_path") !== dirname(__DIR__, 2) ||
67 $ini->readVariable("server", "timezone") !== $this->config->getServerTimeZone()->getName() ||
68 $ini->readVariable("clients", "default") !== $this->config->getClientId()
69 ;
70 }

References $ini.

◆ isNotable()

ilSetupConfigStoredObjective::isNotable ( )

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

26 : bool
27 {
28 return false;
29 }

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