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