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

 with_aria_label ()
 

description: > Example for rendering a dropdown with aria labels More...

 
 with_buttons_and_links ()
 

description: > Example for rendering a dropdown with buttons and links More...

 
 with_divider ()
 

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

 
 with_divider_with_label ()
 

description: > Example for rendering a dropdown with a divider including a label More...

 

Function Documentation

◆ with_aria_label()

ILIAS\UI\examples\Dropdown\Standard\with_aria_label ( )


description: > Example for rendering a dropdown with aria labels

expected output: > ILIAS shows base dropdown button without a title. Clicking the button will open a dropdown menu with two entries rendered as shy buttons. Clicking the entries will open the

appropriate website in the same browser window.

Definition at line 34 of file with_aria_label.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("GitHub", "https://www.github.com"),
42  $f->button()->shy("Bugs", "https://mantis.ilias.de"),
43  );
44  return $renderer->render($f->dropdown()->standard($items)->withAriaLabel("MyLabel"));
45 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_buttons_and_links()

ILIAS\UI\examples\Dropdown\Standard\with_buttons_and_links ( )


description: > Example for rendering a dropdown with buttons and links

expected output: > ILIAS shows a base dropdown button. Clicking the button will open a dropdown menu with the entries "ILIAS" rendered as a link and "GitHub" rendered as a shy button. Clicking the shy button will open the appropriate website in the same browser window while clicking the link will open the

appropriate website in a new browser tab.

Definition at line 35 of file with_buttons_and_links.php.

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

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

◆ with_divider()

ILIAS\UI\examples\Dropdown\Standard\with_divider ( )


description: > Example for rendering a dropdown with dividers

expected output: > ILIAS shows a base dropdown button. Clicking the button will open a dropdown menu with entries divided by a fine line.

Clicking the entries will open the appropriate website in the same browser window.

Definition at line 34 of file with_divider.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->divider()->horizontal(),
43  $f->button()->shy("GitHub", "https://www.github.com")
44  );
45  return $renderer->render($f->dropdown()->standard($items)->withLabel("Actions"));
46 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_divider_with_label()

ILIAS\UI\examples\Dropdown\Standard\with_divider_with_label ( )


description: > Example for rendering a dropdown with a divider including a label

expected output: > ILIAS shows a base dropdown button. Clicking the button will open a dropdown menu with entries. The last three entries are positioned under the not clickable caption "ILIAS".

Clicking the entries will open the appropriate website in the same browser window.

Definition at line 34 of file with_divider_with_label.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("GitHub", "https://www.github.com"),
42  $f->divider()->horizontal()->withLabel("ILIAS"),
43  $f->button()->shy("Docu", "https://www.ilias.de"),
44  $f->button()->shy("Features", "https://feature.ilias.de"),
45  $f->button()->shy("Bugs", "https://mantis.ilias.de"),
46  );
47  return $renderer->render($f->dropdown()->standard($items)->withLabel("Actions"));
48 }
$renderer
global $DIC
Definition: shib_login.php:22