ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ShortlinkInfoGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
22
29{
30 #[Command('read')]
31 private function index(): void
32 {
33 $refinery = $this->pons->in()->refinery();
34 $content = file_get_contents(__DIR__ . '/../../CONFIGURATION.md');
35
36 $this->pons->out()->outString(
37 $refinery->string()->markdown(false)->toHTML()->transform($content)
38 );
39 }
40
41 public function executeCommand(): bool
42 {
43 if ($this->pons->handle(ilObjStaticUrlServiceGUI::TAB_INFO)) {
44 return true;
45 }
46
47 match ($cmd = $this->pons->flow()->getCommand(self::CMD_DEFAULT)) {
48 self::CMD_DEFAULT => $this->index(),
49 default => $this->pons->out()->outString(
50 'Unknown command: ' . $cmd
51 ),
52 };
53 return true;
54 }
55
56 public function getTokensToKeep(): array
57 {
58 return [];
59 }
60
61}