ILIAS  trunk Revision v11.0_alpha-2406-g7062992332c
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\examples\Menu\Drilldown Namespace Reference

Functions

 drilldown ()
 

description: > The example shows how to create and render a basic markdown field and attach it to a form. More...

 
 toBulky (string $label)
 

Function Documentation

◆ drilldown()

ILIAS\UI\examples\Menu\Drilldown\drilldown ( )


description: > The example shows how to create and render a basic markdown field and attach it to a form.

0 Animal of the year 1 Switzerland 1.1 Riverine Amphipod (gammarus fossarum) 1.2 Wildcat 1.2.1 European Wildcat 1.2.2 African Wildcat 2 Germany 2.1 Otter 2.2 Mole –divider– 2.3 Deer

expected output: > ILIAS shows a box titled "Animal of the year" and two drilldowns including a hover effect. Clicking the drilldowns opens up more sub-entries or links pointing to the ILIAS page or open up a modal.

Clicking the heading will lead one level back.

Definition at line 46 of file drilldown.php.

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

Referenced by ILIAS\UI\Implementation\Component\MainControls\Slate\Drilldown\__construct().

47 {
48  global $DIC;
49  $f = $DIC->ui()->factory();
50  $renderer = $DIC->ui()->renderer();
51 
52  $ico = $f->symbol()->icon()->standard('', '')->withSize('small')->withAbbreviation('+');
53  $image = $f->image()->responsive("assets/ui-examples/images/Image/mountains.jpg", "Some mountains in the dusk");
54  $page = $f->modal()->lightboxImagePage($image, 'Mountains');
55  $modal = $f->modal()->lightbox($page);
56  $button = $f->button()->bulky($ico->withAbbreviation('>'), 'Modal', '')
57  ->withOnClick($modal->getShowSignal());
58 
59  $uri = new \ILIAS\Data\URI('https://ilias.de');
60  $link = $f->link()->bulky($ico->withAbbreviation('>'), 'Link', $uri);
61  $divider = $f->divider()->horizontal();
62 
63  $items = [
64  $f->menu()->sub('Switzerland', [
65  $f->menu()->sub('Riverine Amphipod', [$button, $link]),
66  $f->menu()->sub('Wildcat', [
67  $f->menu()->sub('European Wildcat', [$button, $link]),
68  $f->menu()->sub('African Wildcat', [$button, $link, $divider, $link])
69  ]),
70  $button,
71  $link
72  ]),
73 
74  $f->menu()->sub('Germany', [
75  $f->menu()->sub('Otter', [$button, $link]),
76  $f->menu()->sub('Mole', [$button, $link]),
77  $divider,
78  $f->menu()->sub('Deer', [$button, $link])
79  ])
80  ];
81 
82  $dd = $f->menu()->drilldown('Animal of the year', $items);
83 
84  return $renderer->render([
85  $dd,
86  $modal
87  ]);
88 }
$renderer
global $DIC
Definition: shib_login.php:26
+ Here is the caller graph for this function:

◆ toBulky()

ILIAS\UI\examples\Menu\Drilldown\toBulky ( string  $label)

Definition at line 91 of file drilldown.php.

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

91  : \ILIAS\UI\Component\Button\Bulky
92 {
93  global $DIC;
94  $f = $DIC->ui()->factory();
95  $ico = $f->symbol()->icon()->standard('', '')
96  ->withSize('small')
97  ->withAbbreviation('+');
98 
99  return $f->button()->bulky($ico, $label, '');
100 }
global $DIC
Definition: shib_login.php:26