ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\Examples\Dropdown\Standard Namespace Reference

Functions

 base ()
 

Function Documentation

◆ base()

ILIAS\UI\Examples\Dropdown\Standard\base ( )

description: > Example for rendering a dropdown.

expected output: > ILIAS shows a dropdown button with a title and arrow symbol. Clicking the button will open a dropdown menu with entries rendered as shy buttons. Clicking the entries will open

the appropriate website in the same browser window.

Definition at line 34 of file base.php.

35{
36 global $DIC;
37 $f = $DIC->ui()->factory();
38 $renderer = $DIC->ui()->renderer();
39
40 $items = array(
41 $f->button()->shy("ILIAS", "https://www.ilias.de"),
42 $f->button()->shy("GitHub", "https://www.github.com")
43 );
44 return $renderer->render($f->dropdown()->standard($items)->withLabel("Actions"));
45}
$renderer
global $DIC
Definition: shib_login.php:26

References $DIC, Vendor\Package\$f, and $renderer.