ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
BaseInstructions.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ilSetting;
24
25abstract class BaseInstructions
26{
27 public function __construct(
28 protected Repository $repo,
29 protected UriBuilder $uri_builder,
30 protected ilSetting $settings,
31 protected string $language
32 ) {
33 }
34
35 public function getMountInstructionsAsArray(array $mount_instructions = []): array
36 {
37 if ($mount_instructions === []) {
38 $document = $this->repo->getMountInstructionsByLanguage($this->language);
39 $processed = $document->getProcessedInstructions();
40 $mount_instructions = json_decode($processed, true);
41 }
42
43 return $this->fillPlaceholdersForMountInstructions($mount_instructions);
44 }
45
46 abstract protected function fillPlaceholdersForMountInstructions(array $mount_instructions): array;
47}
fillPlaceholdersForMountInstructions(array $mount_instructions)
__construct(protected Repository $repo, protected UriBuilder $uri_builder, protected ilSetting $settings, protected string $language)
getMountInstructionsAsArray(array $mount_instructions=[])
ILIAS Setting Class.