5require_once(
"libs/composer/vendor/autoload.php");
6require_once(__DIR__ .
"../../../Base.php");
8use \ILIAS\UI\Component as
C;
9use \ILIAS\UI\Implementation\Component as
I;
30 public function getChildren($record, $environment =
null) : array
32 return $record->getChildren();
39 ) :
C\Tree\Node\Node {
52 public function tree()
54 return new I\Tree\Factory();
64 $n1 =
new DataNode(
'1', [$n11, $n12]);
71 $this->tree =
$f->tree()->expandable($label, $recursion)
77 $html = str_replace([
"\n",
"\r",
"\t"],
"", $html);
78 $html = preg_replace(
'# {2,}#',
" ", $html);
85 $html = $r->render($this->tree);
87 $expected =
'<ul id="id_1" class="il-tree" role="tree" aria-label="label">' . $this->
getInnerTreePart() .
'</ul>';
98 $html = $r->render($this->tree->withIsSubTree(
true));
110 return '<li id="" class="il-tree-node node-simple expandable" role="treeitem" aria-expanded="false">
111 <span class="node-line"><span class="node-label">1</span></span>
114 <li id="" class="il-tree-node node-simple" role="treeitem">
115 <span class="node-line"><span class="node-label">1.1</span></span>
117 <li id="" class="il-tree-node node-simple expandable" role="treeitem" aria-expanded="false">
118 <span class="node-line"><span class="node-label">1.2</span></span>
121 <li id="" class="il-tree-node node-simple" role="treeitem">
122 <span class="node-line"><span class="node-label">1.2.1</span></span>
128 <li id="" class="il-tree-node node-simple" role="treeitem">
129 <span class="node-line"><span class="node-label">2</span></span>
An exception for terminatinating execution or to throw for unit testing.
__construct(string $label, array $children=[])
Tests for the Expandable Tree.
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
Provides common functionality for UI tests.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
build(C\Tree\Node\Factory $factory, $record, $environment=null)
getChildren($record, $environment=null)