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

Public Member Functions

 __construct (\ilPreviewSetupConfig $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 7 of file class.ilPreviewConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilPreviewConfigStoredObjective::__construct ( \ilPreviewSetupConfig  $config)

Definition at line 14 of file class.ilPreviewConfigStoredObjective.php.

References $config.

Member Function Documentation

◆ achieve()

ilPreviewConfigStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 42 of file class.ilPreviewConfigStoredObjective.php.

42 : Setup\Environment
43 {
44 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
45
46 $ini->setVariable("tools", "ghostscript", $this->config->getPathToGhostscript());
47
48 if (!$ini->write()) {
49 throw new Setup\UnachievableException("Could not write ilias.ini.php");
50 }
51
52 return $environment;
53 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilPreviewConfigStoredObjective::getHash ( )

Definition at line 20 of file class.ilPreviewConfigStoredObjective.php.

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

◆ getLabel()

ilPreviewConfigStoredObjective::getLabel ( )

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

25 : string
26 {
27 return "Store configuration of Services/Preview";
28 }

◆ getPreconditions()

ilPreviewConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 35 of file class.ilPreviewConfigStoredObjective.php.

35 : array
36 {
37 return [
39 ];
40 }

◆ isApplicable()

ilPreviewConfigStoredObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 58 of file class.ilPreviewConfigStoredObjective.php.

58 : bool
59 {
60 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
61
62 return $ini->readVariable("tools", "ghostscript") !== $this->config->getPathToGhostscript();
63 }

References $ini.

◆ isNotable()

ilPreviewConfigStoredObjective::isNotable ( )

Definition at line 30 of file class.ilPreviewConfigStoredObjective.php.

30 : bool
31 {
32 return false;
33 }

Field Documentation

◆ $config

ilPreviewConfigStoredObjective::$config
protected

Definition at line 12 of file class.ilPreviewConfigStoredObjective.php.

Referenced by __construct().


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