ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
nested.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
22 function nested()
23 {
24  global $DIC;
25  $ui_factory = $DIC['ui.factory'];
26  $renderer = $DIC['ui.renderer'];
27  $tpl = $DIC['tpl'];
28  $tpl->addCss('assets/ui-examples/css/alignment_examples.css');
29 
30  $icon = $ui_factory->image()->standard("assets/images/logo/HeaderIconResponsive.svg", "ilias");
31  $blocks = [
32  $ui_factory->legacy('<div class="example_block fullheight blue">Example Block</div>'),
33  $icon,
34  $ui_factory->legacy('<div class="example_block fullheight green">Another Example Block</div>'),
35  $icon,
36  $ui_factory->legacy('<div class="example_block fullheight yellow">And a third block is also part of this group</div>')
37  ];
38 
39  $dynamic = $ui_factory->layout()->alignment()->horizontal()->dynamicallyDistributed(...$blocks);
40  $evenly = $ui_factory->layout()->alignment()->horizontal()->evenlyDistributed(
41  $icon,
42  $icon,
43  $dynamic
44  );
45 
46 
47  $vertical = $ui_factory->layout()->alignment()->vertical(
48  $ui_factory->legacy('<div class="example_block fullheight red">The block above.</div>'),
49  $evenly,
50  $ui_factory->legacy('<div class="example_block fullheight red">The block below.</div>')
51  );
52 
53 
54  return $renderer->render($vertical);
55 }
$renderer
nested()
expected output: > ILIAS shows several sections.
Definition: nested.php:22
global $DIC
Definition: shib_login.php:25