ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
Property.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\Implementation\Component\Listing
;
22
23
use
ILIAS\UI\Component\Listing
as
IListing
;
24
use
ILIAS\UI\Component\Symbol\Symbol
;
25
use
ILIAS\UI\Component\Legacy\Legacy
;
26
use
ILIAS\UI\Component\Link\Standard
as
StandardLink
;
27
use
ILIAS\UI\Implementation\Component\ComponentHelper
;
28
33
class
Property
extends
Listing
implements
IListing\Property
34
{
35
use
ComponentHelper
;
36
protected
const
ALLOWED_VALUE_TYPES
= [
37
Symbol::class,
38
Legacy::class,
39
StandardLink::class
40
];
41
42
public
function
__construct
()
43
{
44
$this->items = [];
45
}
46
50
public
function
withItems
(array
$items
): self
51
{
52
$clone = clone $this;
53
$clone->items = [];
54
foreach
($items as $item) {
55
$clone = $clone->withProperty(...$item);
56
}
57
return
$clone;
58
}
59
60
public
function
withProperty
(
61
string
$label,
62
string
|
Symbol
|
Legacy
|
StandardLink
$value,
63
bool
$show_label =
true
64
): self {
65
if
(is_array($value)) {
66
$this->checkArgListElements(
"value"
, $value, self::ALLOWED_VALUE_TYPES);
67
}
68
$clone = clone $this;
69
$clone->items[] = [$label, $value, $show_label];
70
return
$clone;
71
}
72
}
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:29
ILIAS\UI\Implementation\Component\Listing\Listing\$items
array $items
Definition:
Listing.php:34
ILIAS\UI\Implementation\Component\Listing\Property\ALLOWED_VALUE_TYPES
const ALLOWED_VALUE_TYPES
Definition:
Property.php:36
ILIAS\UI\Implementation\Component\Listing\Property\__construct
__construct()
Definition:
Property.php:42
ILIAS\UI\Component\Legacy\Legacy
Definition:
Legacy.php:32
ILIAS\UI\Implementation\Component\Listing\Listing
Definition:
Listing.php:30
Symbol
ILIAS\UI\Component\Listing
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\UI\Implementation\Component\Listing\Property\withItems
withItems(array $items)
Sets the items to be listed.(Component|string)[]
Definition:
Property.php:50
Standard
ILIAS\UI\Component\Listing\Property
Definition:
Property.php:31
ILIAS\UI\Implementation\Component\Listing\Property
Definition:
Property.php:33
ILIAS\UI\Implementation\Component\Listing\Property\withProperty
withProperty(string $label, string|Symbol|Legacy|StandardLink $value, bool $show_label=true)
Definition:
Property.php:60
ILIAS\UI\Implementation\Component\Listing
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ComponentHelper
Legacy
ComponentHelper
src
UI
Implementation
Component
Listing
Property.php
Generated on Wed Sep 10 2025 14:12:09 for ILIAS by
1.8.13 (using
Doxyfile
)