ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 @inheritDoc More...
 
 __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)

Reimplemented from ilSetupObjective.

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

27 {
29 }
__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 53 of file class.ilSetupConfigStoredObjective.php.

53 : Setup\Environment
54 {
55 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
56
57 $ini->setVariable("server", "absolute_path", dirname(__DIR__, 4));
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:20

References $ini.

◆ 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)

@inheritDoc

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

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

References $ini.

◆ 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: