ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Echoing.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
30class Echoing implements HelpTextRetriever
31{
32 public function getHelpText(Help\Purpose $purpose, Help\Topic ...$topics): array
33 {
34 if ($purpose->isTooltip()) {
35 $purpose = "tooltip";
36 } else {
37 throw new \LogicException("Unknown purpose.");
38 }
39
40 return array_map(
41 fn ($t) => $purpose . ": " . $t->get(),
43 );
44 }
45}
A purpose describes the intended use for a certain help text.
Definition: Purpose.php:47
This HelpTextRetriever simply echo the purpose and the topics for debugging and development purpose.
Definition: Echoing.php:31
getHelpText(Help\Purpose $purpose, Help\Topic ... $topics)
Definition: Echoing.php:32
This is just a class that marks a string as a help topic.
Definition: Topic.php:27
This describes a facility that the UI framework can use to retrieve some help text.