3 declare(strict_types=1);
21 require_once(
"libs/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../../Base.php");
33 protected C\Symbol\Icon\Standard
$icon;
34 protected C\Symbol\Glyph\Glyph
$glyph;
42 public function menu(): C\Menu\Factory
45 new I\SignalGenerator()
48 public function button(): C\Button\Factory
50 return new I\Button\Factory();
52 public function legacy(
string $content): C\Legacy\Legacy
54 return new I\Legacy\Legacy(
56 new I\SignalGenerator()
61 return new I\Symbol\Factory(
72 $icon_factory =
new I\Symbol\Icon\Factory();
73 $glyph_factory =
new I\Symbol\Glyph\Factory();
74 $button_factory =
new I\Button\Factory();
75 $divider_factory =
new I\Divider\Factory();
76 $this->icon = $icon_factory->standard(
'',
'');
77 $this->glyph = $glyph_factory->user(
'');
78 $this->button = $button_factory->standard(
'',
'');
79 $this->divider = $divider_factory->horizontal();
86 $menu =
$f->menu()->drilldown(
'root', []);
87 $this->assertInstanceOf(
88 "ILIAS\\UI\\Component\\Menu\\Menu",
91 $this->assertInstanceOf(
92 "ILIAS\\UI\\Component\\Menu\\Drilldown",
96 $menu =
$f->menu()->drilldown(
'root', []);
127 $f->menu()->sub(
'sub', [
134 $menu =
$f->menu()->drilldown(
'root', $items);
144 $this->expectException(InvalidArgumentException::class);
146 $f->menu()->drilldown(
'label', [$this->
legacy]);
158 $f->menu()->sub(
'1', [
159 $f->menu()->sub(
'1.1', []),
160 $f->menu()->sub(
'1.2', []),
162 $f->menu()->sub(
'2', [])
164 $menu =
$f->menu()->drilldown(
'root', $items);
166 $html = $r->render($menu);
167 $expected = file_get_contents(__DIR__ .
"/drilldown_test.html");
180 $this->assertNull($menu->getPersistenceId()) ;
185 $menu->withPersistenceId($id)->getPersistenceId()
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
C Symbol Glyph Glyph $glyph
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
C Symbol Icon Standard $icon
C Divider Horizontal $divider
testGetItems($menu)
testConstruction
Provides common functionality for UI tests.
testWithPersistenceId($menu)
testConstruction
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
C Button Standard $button
testRendering()
testWithEntries
testGetLabel(C\Menu\Drilldown $menu)
testConstruction