ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
nested.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
38 function nested()
39 {
40  global $DIC;
41  $ui_factory = $DIC['ui.factory'];
42  $renderer = $DIC['ui.renderer'];
43  $tpl = $DIC['tpl'];
44  $tpl->addCss('assets/ui-examples/css/alignment_examples.css');
45 
46  $icon = $ui_factory->image()->standard("assets/images/logo/HeaderIconResponsive.svg", "ilias");
47  $blocks = [
48  $ui_factory->legacy()->content('<div class="example_block fullheight blue">Example Block</div>'),
49  $icon,
50  $ui_factory->legacy()->content('<div class="example_block fullheight green">Another Example Block</div>'),
51  $icon,
52  $ui_factory->legacy()->content('<div class="example_block fullheight yellow">And a third block is also part of this group</div>')
53  ];
54 
55  $dynamic = $ui_factory->layout()->alignment()->horizontal()->dynamicallyDistributed(...$blocks);
56  $evenly = $ui_factory->layout()->alignment()->horizontal()->evenlyDistributed(
57  $icon,
58  $icon,
59  $dynamic
60  );
61 
62 
63  $vertical = $ui_factory->layout()->alignment()->vertical(
64  $ui_factory->legacy()->content('<div class="example_block fullheight red">The block above.</div>'),
65  $evenly,
66  $ui_factory->legacy()->content('<div class="example_block fullheight red">The block below.</div>')
67  );
68 
69 
70  return $renderer->render($vertical);
71 }
$renderer
nested()
expected output: > ILIAS shows several sections.
Definition: nested.php:38
global $DIC
Definition: shib_login.php:22