3 declare(strict_types=1);
21 $f = $DIC->ui()->factory();
24 $icon =
$f->symbol()->icon()->standard(
"crs",
'Example');
25 $long_value =
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, 26 sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquy';
28 $node1 =
$f->tree()->node()->keyValue(
'label',
'value');
29 $node2 =
$f->tree()->node()->keyValue(
'label', $long_value)
30 ->withLink(
new \
ILIAS\
Data\
URI(
'https://docu.ilias.de'));
31 $node3 =
$f->tree()->node()->keyValue(
'label',
'value', $icon);
32 $node4 =
$f->tree()->node()->keyValue(
'label',
'value', $icon)
33 ->withLink(
new \
ILIAS\
Data\
URI(
'https://docu.ilias.de'));
34 $data = [[
'node' => $node1,
'children' => [
36 [
'node' => $node3,
'children' => [
42 public function getChildren($record, $environment = null): array
44 return $record[
'children'] ?? [];
47 public function build(
51 ): \ILIAS\UI\Component\Tree\Node\Node {
52 $node = $record[
'node'];
53 if (isset($record[
'children'])) {
54 $node = $node->withExpanded(
true);
60 $tree =
$f->tree()->expandable(
'Label', $recursion)
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This is how the factory for UI elements looks.
key_value()
description: > Example for rendering a tree node with key values.
The scope of this class is split ilias-conform URI's into components.