19declare(strict_types=1);
36 $f =
$DIC->ui()->factory();
39 $getDataNode =
function (
string $label, array $children = []) {
40 return new class ($label, $children) {
41 protected string $label =
'';
42 protected array $children = [];
44 public function __construct(
string $label, array $children = [])
46 $this->label = $label;
47 $this->children = $children;
55 public function getChildren(): array
57 return $this->children;
62 $n11 = $getDataNode(
'1.1');
63 $n12 = $getDataNode(
'1.2', [$getDataNode(
'1.2.1')]);
64 $n1 = $getDataNode(
'1', [$n11, $n12]);
68 public function getChildren($record, $environment =
null): array
70 return $record->getChildren();
73 public function build(
78 return $factory->simple($record->getLabel());
82 $tree =
$f->tree()->expandable(
"Label", $recursion)
Builds a Color from either hex- or rgb values.
__construct()
Constructor setup ILIAS global object @access public.
This describes a Tree Node.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.