ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
HasHelpTopics.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\Implementation\Component
;
22
23
use
ILIAS\UI\Help\Topic
;
24
25
trait
HasHelpTopics
26
{
28
protected
array $help_topics = [];
29
33
public
function
withHelpTopics
(
Topic
...
$topics
): static
34
{
35
$clone = clone $this;
36
$clone->help_topics = array_unique($topics, SORT_REGULAR);
37
sort
($clone->help_topics);
38
return
$clone;
39
}
40
44
public
function
withAdditionalHelpTopics
(
Topic
...
$topics
): static
45
{
46
$clone = clone $this;
47
$clone->help_topics = array_unique(array_merge($this->help_topics, $topics), SORT_REGULAR);
48
sort
($clone->help_topics);
49
return
$clone;
50
}
51
55
public
function
getHelpTopics
(): array
56
{
57
return
$this->help_topics;
58
}
59
}
ILIAS\UI\Implementation\Component
ILIAS\UI\Help\Topic
This is just a class that marks a string as a help topic.
Definition:
Topic.php:26
Topic
ILIAS\UI\Implementation\Component\getHelpTopics
getHelpTopics()
Definition:
HasHelpTopics.php:55
ILIAS\UI\examples\Symbol\Glyph\Sort\sort
sort()
description: > Example for rendering a Sort Glyph.
Definition:
sort.php:41
ILIAS\UI\Implementation\Component\withHelpTopics
withHelpTopics(Topic ... $topics)
Definition:
HasHelpTopics.php:33
ILIAS\GlobalScreen\Scope\$topics
array $topics
Definition:
ComponentDecoratorTrait.php:39
ILIAS\UI\Implementation\Component\withAdditionalHelpTopics
withAdditionalHelpTopics(Topic ... $topics)
Definition:
HasHelpTopics.php:44
HasHelpTopics
components
ILIAS
UI
src
Implementation
Component
HasHelpTopics.php
Generated on Sun Aug 31 2025 23:04:07 for ILIAS by
1.8.13 (using
Doxyfile
)