ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMathJaxConfigStoredObjective Class Reference
+ Inheritance diagram for ilMathJaxConfigStoredObjective:
+ Collaboration diagram for ilMathJaxConfigStoredObjective:

Public Member Functions

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

Protected Attributes

 $config
 

Detailed Description

Definition at line 7 of file class.ilMathJaxConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilMathJaxConfigStoredObjective::__construct ( \ilMathJaxSetupConfig  $config)

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

References $config.

Member Function Documentation

◆ achieve()

ilMathJaxConfigStoredObjective::achieve ( Setup\Environment  $environment)

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

References $ini.

42  : Setup\Environment
43  {
44  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
45 
46  $ini->setVariable("tools", "latex", $this->config->getPathToLatexCGI());
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

◆ getHash()

ilMathJaxConfigStoredObjective::getHash ( )

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

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

◆ getLabel()

ilMathJaxConfigStoredObjective::getLabel ( )

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

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

◆ getPreconditions()

ilMathJaxConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

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

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

◆ isApplicable()

ilMathJaxConfigStoredObjective::isApplicable ( Setup\Environment  $environment)

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

References $ini.

58  : bool
59  {
60  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
61 
62  return $ini->readVariable("tools", "latex") !== $this->config->getPathToLatexCGI();
63  }
$ini
Definition: raiseError.php:4

◆ isNotable()

ilMathJaxConfigStoredObjective::isNotable ( )

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

30  : bool
31  {
32  return false;
33  }

Field Documentation

◆ $config

ilMathJaxConfigStoredObjective::$config
protected

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

Referenced by __construct().


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