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 
20 function nested()
21 {
22  global $DIC;
23  $ui_factory = $DIC['ui.factory'];
24  $renderer = $DIC['ui.renderer'];
25  $tpl = $DIC['tpl'];
26  $tpl->addCss('assets/ui-examples/css/alignment_examples.css');
27 
28  $blocks = [
29  $ui_factory->legacy('<div class="example_block fullheight blue">D</div>'),
30  $ui_factory->legacy('<div class="example_block fullheight green">E</div>'),
31  $ui_factory->legacy('<div class="example_block fullheight yellow">F</div>')
32  ];
33 
34  $aligned = $ui_factory->layout()->alignment()->horizontal()->evenlyDistributed(
35  $ui_factory->legacy('<div class="example_block bluedark">A</div>'),
36  $ui_factory->legacy('<div class="example_block greendark">B</div>'),
37  $ui_factory->legacy('<div class="example_block yellowdark">C</div>')
38  );
39 
40  return $renderer->render(
41  $ui_factory->layout()->alignment()->horizontal()
42  ->evenlyDistributed(
43  $aligned,
44  ...$blocks
45  )
46  );
47 }
$renderer
nested()
expected output: > ILIAS shows colored text-blocks labeld A to F.
Definition: nested.php:20
global $DIC
Definition: shib_login.php:25