ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
drilldown.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
7 function drilldown()
8 {
9 
25  global $DIC;
26  $f = $DIC->ui()->factory();
27  $renderer = $DIC->ui()->renderer();
28 
29  $ico = $f->symbol()->icon()->standard('', '')->withSize('small')->withAbbreviation('+');
30  $image = $f->image()->responsive("src/UI/examples/Image/mountains.jpg", "Image source: https://stocksnap.io, Creative Commons CC0 license");
31  $page = $f->modal()->lightboxImagePage($image, 'Mountains');
32  $modal = $f->modal()->lightbox($page);
33  $button = $f->button()->bulky($ico->withAbbreviation('>'), 'Modal', '')
34  ->withOnClick($modal->getShowSignal());
35 
36  $uri = new \ILIAS\Data\URI('https://ilias.de');
37  $link = $f->link()->bulky($ico->withAbbreviation('>'), 'Link', $uri);
38  $divider = $f->divider()->horizontal();
39 
40  $items = [
41  $f->menu()->sub('Switzerland', [
42  $f->menu()->sub('Riverine Amphipod', [$button, $link]),
43  $f->menu()->sub('Wildcat', [
44  $f->menu()->sub('European Wildcat', [$button, $link]),
45  $f->menu()->sub('African Wildcat', [$button, $link, $divider, $link])
46  ]),
47  $button,
48  $link
49  ]),
50 
51  $f->menu()->sub('Germany', [
52  $f->menu()->sub('Otter', [$button, $link]),
53  $f->menu()->sub('Mole', [$button, $link]),
54  $divider,
55  $f->menu()->sub('Deer', [$button, $link])
56  ])
57  ];
58 
59  $dd = $f->menu()->drilldown('Animal of the year', $items);
60 
61  return $renderer->render([
62  $dd,
63  $modal
64  ]);
65 }
66 
67 
68 function toBulky(string $label): \ILIAS\UI\Component\Button\Bulky
69 {
70  global $DIC;
71  $f = $DIC->ui()->factory();
72  $ico = $f->symbol()->icon()->standard('', '')
73  ->withSize('small')
74  ->withAbbreviation('+');
75 
76  return $f->button()->bulky($ico, $label, '');
77 }
Class Factory.
Class ChatMainBarProvider .
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...
Definition: Bulky.php:21
global $DIC
Definition: feed.php:28