ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
TagCollection.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Data\Meta\Html
;
22
23
use
Generator
;
24
28
class
TagCollection
extends
Tag
29
{
33
protected
array
$tags
;
34
35
public
function
__construct
(
Tag
...$tags)
36
{
37
$this->tags =
$tags
;
38
}
39
43
public
function
toHtml
(): string
44
{
45
$html =
''
;
46
foreach
($this->
getTags
() as $tag) {
47
$html .= $tag->toHtml();
48
$html .= PHP_EOL;
49
}
50
51
return
$html;
52
}
53
57
public
function
getTags
():
Generator
58
{
59
foreach
($this->tags as $tag) {
60
foreach
($tag->getTags() as $t) {
61
yield $t;
62
}
63
}
64
}
65
}
ILIAS\Data\Meta\Html\TagCollection
Definition:
TagCollection.php:28
ILIAS\Data\Meta\Html
Definition:
Factory.php:21
ILIAS\Data\Meta\Html\TagCollection\toHtml
toHtml()
Definition:
TagCollection.php:43
ILIAS\Data\Meta\Html\TagCollection\$tags
array $tags
Definition:
TagCollection.php:33
ILIAS\Data\Meta\Html\TagCollection\getTags
getTags()
Definition:
TagCollection.php:57
Generator
ILIAS\Data\Meta\Html\Tag
Definition:
Tag.php:28
ILIAS\Data\Meta\Html\TagCollection\__construct
__construct(Tag ... $tags)
Definition:
TagCollection.php:35
components
ILIAS
Data
src
Meta
Html
TagCollection.php
Generated on Wed Sep 3 2025 23:02:49 for ILIAS by
1.8.13 (using
Doxyfile
)