18declare(strict_types=1);
44 $factory =
$DIC->ui()->factory();
48 public function getNodes(
49 NodeFactory $node_factory,
50 IconFactory $icon_factory,
51 array $sync_node_id_whitelist = [],
52 ?
string $parent_id =
null,
54 yield $node_factory->branch(
58 $node_factory->branch(
62 $node_factory->leaf([
'1',
'1.1',
'1.1.1'],
'leaf node 1.1.1'),
63 $node_factory->leaf([
'1',
'1.1',
'1.1.2'],
'leaf node 1.1.2'),
65 $node_factory->leaf([
'1',
'1.2'],
'leaf node 1.2'),
69 public function getNodesAsLeaf(
70 NodeFactory $node_factory,
71 IconFactory $icon_factory,
78 $input = $factory->input()->field()->treeMultiSelect(
80 "select multiple nodes",
81 "you can also select child-nodes of selected nodes!",
84 $input = $input->withSelectChildNodes(
true);
86 $form = $factory->input()->container()->form()->standard(
'#', [$input]);
This is how a factory for icons looks like.