ILIAS  release_8 Revision v8.24
class.ilMathJaxConfigSettingsRepository.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
27
33 {
34 $this->settings = $settings;
35 }
36
40 public function getConfig(): ilMathJaxConfig
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 }
55
59 public function updateConfig(ilMathJaxConfig $config): 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 }
72}
Repository for storing and loading the MathJax configuration.
updateConfig(ilMathJaxConfig $config)
Update the MathNax Configuration.
Global Mathjax configuration.
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85