ILIAS  release_8 Revision v8.24
class.ilMathJaxMetricsCollectedObjective.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20use ILIAS\Setup;
22
24{
25 protected function getTentativePreconditions(Setup\Environment $environment): array
26 {
27 return [
28 new \ilSettingsFactoryExistsObjective()
29 ];
30 }
31
32 protected function collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage): void
33 {
35 $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
36 $repo = new ilMathJaxConfigSettingsRepository($factory->settingsFor('MathJax'));
37 $config = $repo->getConfig();
38
39 $setup_config = new ilMathJaxSetupConfig([]);
40 foreach ($setup_config->getDataFromConfig($config) as $key => $value) {
41 if (is_bool($value)) {
42 $storage->storeStableBool($key, $value);
43 } else {
44 $storage->storeStableText($key, (string) $value);
45 }
46 }
47 }
48}
Repository for storing and loading the MathJax configuration.
An environment holds resources to be used in the setup process.
Definition: Environment.php:28
$factory
Definition: metadata.php:75
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
string $key
Consumer key/client ID value.
Definition: System.php:193
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: ByTrying.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...