ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
drilldown.php
Go to the documentation of this file.
1 <?php
2 function drilldown()
3 {
4  global $DIC;
5  $f = $DIC->ui()->factory();
6  $renderer = $DIC->ui()->renderer();
7 
8 
9  $ico = $f->symbol()->icon()->standard('', '')->withSize('medium')->withAbbreviation('+');
10 
11  $image = $f->image()->responsive("src/UI/examples/Image/mountains.jpg", "Image source: https://stocksnap.io, Creative Commons CC0 license");
12  $page = $f->modal()->lightboxImagePage($image, 'Mountains');
13  $modal = $f->modal()->lightbox($page);
14 
15  $button = $f->button()->bulky($ico->withAbbreviation('>'), 'Modal', '')
16  ->withOnClick($modal->getShowSignal());
17 
18  $label = $f->button()->bulky($ico->withAbbreviation('0'), 'root', '');
19 
20  $uri = new \ILIAS\Data\URI('https://ilias.de');
21  $link = $f->link()->bulky($ico->withAbbreviation('>>'), 'link', $uri);
22 
23  $items = [
24  $f->menu()->sub(toBulky('1'), [
25  $f->menu()->sub(
26  toBulky('1.1'),
27  [$button, $link]
28  )
29  ->withInitiallyActive(),
30  $f->menu()->sub(toBulky('1.2'), [
31  $f->menu()->sub('1.2.1', [$button]),
32  $f->menu()->sub('1.2.2', [$button])
33  ]),
34  $button
35  ]),
36 
37  $f->menu()->sub(toBulky('2'), [
38  $f->menu()->sub('2.1', [$button]),
39  $f->menu()->sub('2.2', [$button]),
40  $f->divider()->horizontal(),
41  $f->menu()->sub('2.3', [$button])
42  ])
43  ];
44 
45  $dd = $f->menu()->drilldown($label, $items);
46 
47  return $renderer->render([
48  $dd,
49  $modal
50  ]);
51 }
52 
53 
54 function toBulky(string $label) : \ILIAS\UI\Component\Button\Bulky
55 {
56  global $DIC;
57  $f = $DIC->ui()->factory();
58  $ico = $f->symbol()->icon()->standard('', '')
59  ->withSize('medium')
60  ->withAbbreviation('+');
61 
62  return $f->button()->bulky($ico, $label, '');
63 }
drilldown()
Definition: drilldown.php:2
Class Factory.
Class ChatMainBarProvider .
toBulky(string $label)
Definition: drilldown.php:54
$DIC
Definition: xapitoken.php:46