ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Chaining.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
31{
33 protected array $retrievers;
34
35 public function __construct(
37 ) {
38 $this->retrievers = $retrievers;
39 }
40
41 public function getHelpText(Help\Purpose $purpose, Help\Topic ...$topics): array
42 {
43 return array_unique(
44 array_merge(
45 ...array_map(
46 fn ($r) => $r->getHelpText($purpose, ...$topics),
47 $this->retrievers
48 )
49 )
50 );
51 }
52}
A purpose describes the intended use for a certain help text.
Definition: Purpose.php:47
This HelpTextRetriever merges results from various other retrievers (and removes duplicates).
Definition: Chaining.php:31
getHelpText(Help\Purpose $purpose, Help\Topic ... $topics)
Definition: Chaining.php:41
__construct(HelpTextRetriever ... $retrievers)
Definition: Chaining.php:35
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.