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
36function nested()
37{
38 global $DIC;
39 $ui_factory = $DIC['ui.factory'];
40 $renderer = $DIC['ui.renderer'];
41 $tpl = $DIC['tpl'];
42 $tpl->addCss('assets/ui-examples/css/alignment_examples.css');
43
44 $blocks = [
45 $ui_factory->legacy()->content('<div class="example_block fullheight blue">D</div>'),
46 $ui_factory->legacy()->content('<div class="example_block fullheight green">E</div>'),
47 $ui_factory->legacy()->content('<div class="example_block fullheight yellow">F</div>')
48 ];
49
50 $aligned = $ui_factory->layout()->alignment()->horizontal()->evenlyDistributed(
51 $ui_factory->legacy()->content('<div class="example_block bluedark">A</div>'),
52 $ui_factory->legacy()->content('<div class="example_block greendark">B</div>'),
53 $ui_factory->legacy()->content('<div class="example_block yellowdark">C</div>')
54 );
55
56 return $renderer->render(
57 $ui_factory->layout()->alignment()->horizontal()
58 ->evenlyDistributed(
59 $aligned,
60 ...$blocks
61 )
62 );
63}
$renderer
global $DIC
Definition: shib_login.php:26