ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
nested.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
36 function 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
nested()
expected output: > ILIAS shows colored text-blocks labeld A to F.
Definition: nested.php:36
global $DIC
Definition: shib_login.php:22