2 declare(strict_types=1);
6 public function __construct(
string $label, array $children = [])
9 $this->children = $children;
17 return $this->children;
24 $f = $DIC->ui()->factory();
25 $renderer = $DIC->ui()->renderer();
30 $n1 =
new DataNode(
'1', [$n11, $n12]);
33 $recursion =
new class implements \ILIAS\UI\Component\Tree\TreeRecursion {
34 public function getChildren($record, $environment = null) : array
36 return $record->getChildren();
39 public function build(
40 \ILIAS\UI\Component\Tree\Node\Factory
$factory,
44 return $factory->simple($record->getLabel());
48 $tree =
$f->tree()->expandable(
"Label", $recursion)
51 return $renderer->render($tree);
This describes a Tree Node.
__construct(string $label, array $children=[])