ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
nested.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
7 function nested()
8 {
9  global $DIC;
10  $ui_factory = $DIC['ui.factory'];
11  $renderer = $DIC['ui.renderer'];
12  $tpl = $DIC['tpl'];
13  $tpl->addCss('src/UI/examples/Layout/Alignment/alignment_examples.css');
14 
15 
16  $blocks = [
17  $ui_factory->legacy('<div class="example_block fullheight blue">D</div>'),
18  $ui_factory->legacy('<div class="example_block fullheight green">E</div>'),
19  $ui_factory->legacy('<div class="example_block fullheight yellow">F</div>')
20  ];
21 
22  $aligned = $ui_factory->layout()->alignment()->horizontal()->dynamicallyDistributed(
23  $ui_factory->legacy('<div class="example_block bluedark">A</div>'),
24  $ui_factory->legacy('<div class="example_block greendark">B</div>'),
25  $ui_factory->legacy('<div class="example_block yellowdark">C</div>')
26  );
27 
28  return $renderer->render(
29  $ui_factory->layout()->alignment()->horizontal()
30  ->dynamicallyDistributed(
31  $aligned,
32  ...$blocks
33  )
34  );
35 }
global $DIC
Definition: feed.php:28