ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ 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\Help\Topic
This is just a class that marks a string as a help topic.
Definition:
Topic.php:27
ILIAS\UI\Component\HasHelpTopics
Definition:
HasHelpTopics.php:26
ILIAS\GlobalScreen\Scope\$topics
array $topics
Definition:
ComponentDecoratorTrait.php:39
ILIAS\UI\Implementation\Component
ILIAS\UI\Implementation\Component\withAdditionalHelpTopics
withAdditionalHelpTopics(Topic ... $topics)
Definition:
HasHelpTopics.php:44
ILIAS\UI\Implementation\Component\withHelpTopics
withHelpTopics(Topic ... $topics)
Definition:
HasHelpTopics.php:33
ILIAS\UI\Implementation\Component\getHelpTopics
getHelpTopics()
Definition:
HasHelpTopics.php:55
ILIAS\UI\examples\Symbol\Glyph\Sort\sort
sort()
Definition:
sort.php:41
components
ILIAS
UI
src
Implementation
Component
HasHelpTopics.php
Generated on Sat Oct 18 2025 23:04:38 for ILIAS by
1.9.4 (using
Doxyfile
)