ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
ilMathJaxConfigSettingsRepository Class Reference

Repository for storing and loading the MathJax configuration. More...

+ Inheritance diagram for ilMathJaxConfigSettingsRepository:
+ Collaboration diagram for ilMathJaxConfigSettingsRepository:

Public Member Functions

 __construct (ilSetting $settings)
 Constructor. More...
 
 getConfig ()
 Get the MathJax Configuration. More...
 
 updateConfig (ilMathJaxConfig $config)
 Update the MathNax Configuration. More...
 
 getConfig ()
 Get the MathJax Configuration. More...
 
 updateConfig (ilMathJaxConfig $config)
 Update the MathJax Configuration. More...
 

Protected Attributes

ilSetting $settings
 

Detailed Description

Repository for storing and loading the MathJax configuration.

Definition at line 24 of file class.ilMathJaxConfigSettingsRepository.php.

Constructor & Destructor Documentation

◆ __construct()

ilMathJaxConfigSettingsRepository::__construct ( ilSetting  $settings)

Constructor.

Parameters
ilSetting$settings- must be settings with loaded module 'MathJax'

Definition at line 32 of file class.ilMathJaxConfigSettingsRepository.php.

References $settings, and ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ getConfig()

ilMathJaxConfigSettingsRepository::getConfig ( )

Get the MathJax Configuration.

Implements ilMathJaxConfigRespository.

Definition at line 40 of file class.ilMathJaxConfigSettingsRepository.php.

41 {
42 return new ilMathJaxConfig(
43 (bool) $this->settings->get('enable'),
44 (string) $this->settings->get('path_to_polyfill'),
45 (string) $this->settings->get('path_to_mathjax'),
46 (int) $this->settings->get('limiter'),
47 (bool) $this->settings->get('enable_server'),
48 (string) $this->settings->get('server_address'),
49 (int) $this->settings->get('server_timeout'),
50 (bool) $this->settings->get('server_for_browser'),
51 (bool) $this->settings->get('server_for_export'),
52 (bool) $this->settings->get('server_for_pdf')
53 );
54 }
Global Mathjax configuration.

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ updateConfig()

ilMathJaxConfigSettingsRepository::updateConfig ( ilMathJaxConfig  $config)

Update the MathNax Configuration.

Implements ilMathJaxConfigRespository.

Definition at line 59 of file class.ilMathJaxConfigSettingsRepository.php.

59 : void
60 {
61 $this->settings->set('enable', (string) $config->isClientEnabled());
62 $this->settings->set('path_to_polyfill', $config->getClintPolyfillUrl());
63 $this->settings->set('path_to_mathjax', $config->getClientScriptUrl());
64 $this->settings->set('limiter', (string) $config->getClientLimiter());
65 $this->settings->set('enable_server', (string) $config->isServerEnabled());
66 $this->settings->set('server_address', $config->getServerAddress());
67 $this->settings->set('server_timeout', (string) $config->getServerTimeout());
68 $this->settings->set('server_for_browser', (string) $config->isServerForBrowser());
69 $this->settings->set('server_for_export', (string) $config->isServerForExport());
70 $this->settings->set('server_for_pdf', (string) $config->isServerForPdf());
71 }
getClientLimiter()
Type of enclosing limiters for wich the embedded client-side Mathjax is configured.
getServerTimeout()
timeout (s) to wait for the result of the rendering server
isServerForBrowser()
Should the server-side rendingeing be used for browser output.
isServerForPdf()
Should the server-side rendingeing be used for PDF generation.
getServerAddress()
Url of Mathjax server.
isServerEnabled()
Is a server side rendering engine configured and enabled.
isServerForExport()
Should the server-side rendingeing be used for HTML exports.
getClientScriptUrl()
Url of Mathjax script to be embedded with script tag on the page.
getClintPolyfillUrl()
Url of a javascript polyfill (needed by MathJax 3)
isClientEnabled()
Should latex code be rendered in the browser.

References ilMathJaxConfig\getClientLimiter(), ilMathJaxConfig\getClientScriptUrl(), ilMathJaxConfig\getClintPolyfillUrl(), ilMathJaxConfig\getServerAddress(), ilMathJaxConfig\getServerTimeout(), ilMathJaxConfig\isClientEnabled(), ilMathJaxConfig\isServerEnabled(), ilMathJaxConfig\isServerForBrowser(), ilMathJaxConfig\isServerForExport(), ilMathJaxConfig\isServerForPdf(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

Field Documentation

◆ $settings

ilSetting ilMathJaxConfigSettingsRepository::$settings
protected

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

Referenced by __construct().


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