ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
nested.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
38function 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
global $DIC
Definition: shib_login.php:26