ILIAS  release_8 Revision v8.24
ilStyleConfigStoredObjective Class Reference
+ Inheritance diagram for ilStyleConfigStoredObjective:
+ Collaboration diagram for ilStyleConfigStoredObjective:

Public Member Functions

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

Protected Attributes

 $config
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilStyleConfigStoredObjective::__construct ( \ilStyleSetupConfig  $config)

Definition at line 15 of file class.ilStyleConfigStoredObjective.php.

References $config.

Member Function Documentation

◆ achieve()

ilStyleConfigStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 43 of file class.ilStyleConfigStoredObjective.php.

43 : Setup\Environment
44 {
45 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
46
47 $ini->setVariable(
48 "tools",
49 "lessc",
50 $this->config->getPathToLessc() ?? ''
51 );
52 $ini->setVariable("tools", "enable_system_styles_management", $this->config->getManageSystemStyles() ? "1" : "0");
53
54 if (!$ini->write()) {
55 throw new Setup\UnachievableException("Could not write ilias.ini.php");
56 }
57
58 return $environment;
59 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilStyleConfigStoredObjective::getHash ( )

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

21 : string
22 {
23 return hash("sha256", self::class);
24 }

◆ getLabel()

ilStyleConfigStoredObjective::getLabel ( )

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

26 : string
27 {
28 return "Fill ini with settings for Services/Style";
29 }

◆ getPreconditions()

ilStyleConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

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

36 : array
37 {
38 return [
40 ];
41 }

◆ isApplicable()

ilStyleConfigStoredObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 64 of file class.ilStyleConfigStoredObjective.php.

64 : bool
65 {
66 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
67 $manage_system_styles = $this->config->getManageSystemStyles() ? "1" : "0";
68
69 return
70 $ini->readVariable("tools", "lessc") !== $this->config->getPathToLessc() ||
71 $ini->readVariable("tools", "enable_system_styles_management") !== $manage_system_styles
72 ;
73 }

References $ini.

◆ isNotable()

ilStyleConfigStoredObjective::isNotable ( )

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

31 : bool
32 {
33 return false;
34 }

Field Documentation

◆ $config

ilStyleConfigStoredObjective::$config
protected

Definition at line 13 of file class.ilStyleConfigStoredObjective.php.

Referenced by __construct().


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