19 declare(strict_types=1);
    21 require_once(
"vendor/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()
    59             public function symbol(): \ILIAS\UI\Component\Symbol\Factory
    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]);
   154         $r = $this->getDefaultRenderer();
   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");
   170             $this->brutallyTrimHTML($expected),
   171             $this->brutallyTrimHTML($html)
   180         $this->assertNull($menu->getPersistenceId()) ;
   185             $menu->withPersistenceId($id)->getPersistenceId()
 
button(string $caption, string $cmd)
 
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
 
C Symbol Icon Standard $icon
 
C Divider Horizontal $divider
 
testGetItems($menu)
testConstruction 
 
legacy()
 expected output: > ILIAS shows the rendered Component. 
 
testWithPersistenceId($menu)
testConstruction 
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
C Button Standard $button
 
testRendering()
testWithEntries 
 
testGetLabel(C\Menu\Drilldown $menu)
testConstruction