ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\Examples\Dropdown\Standard Namespace Reference

Functions

 base ()
 

description: > Example for rendering a dropdown. More...

 

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.

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

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:22