ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
drilldown.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
46function drilldown()
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}
89
90
91function toBulky(string $label): \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}
$renderer
Definition: UI.php:24
This describes a bulky button.
Definition: Bulky.php:29
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26