ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Chaining.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 use ILIAS\UI\Help;
25 
30 class Chaining implements HelpTextRetriever
31 {
33  protected array $retrievers;
34 
35  public function __construct(
36  HelpTextRetriever ...$retrievers
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),
48  )
49  )
50  );
51  }
52 }
This is just a class that marks a string as a help topic.
Definition: Topic.php:26
A purpose describes the intended use for a certain help text.
Definition: Purpose.php:46
This describes a facility that the UI framework can use to retrieve some help text.
getHelpText(Help\Purpose $purpose, Help\Topic ... $topics)
Definition: Chaining.php:41
This HelpTextRetriever merges results from various other retrievers (and removes duplicates).
Definition: Chaining.php:30
__construct(HelpTextRetriever ... $retrievers)
Definition: Chaining.php:35
$r