3 declare(strict_types=1);
29 $factory = $DIC->ui()->factory();
33 public function getNodes(
34 NodeFactory $node_factory,
35 IconFactory $icon_factory,
36 ?
string $parent_id =
null,
38 yield $node_factory->branch(
'1',
'branch node 1',
null,
39 $node_factory->branch(
'1.1',
'branch node 1.1',
null,
40 $node_factory->leaf(
'1.1.1',
'leaf node 1.1.1'),
41 $node_factory->leaf(
'1.1.2',
'leaf node 1.1.2'),
43 $node_factory->leaf(
'1.2',
'leaf node 1.2'),
46 public function getNodesAsLeaf(
47 NodeFactory $node_factory,
48 IconFactory $icon_factory,
55 $input = $factory->input()->field()->treeMultiSelect(
57 "select multiple nodes",
58 "you can also select child-nodes of selected nodes!",
61 $input = $input->withSelectChildNodes(
true);
63 $form = $factory->input()->container()->form()->standard(
'#', [$input]);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This is how a factory for icons looks like.