ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
33 function base(): string
34 {
35  global $DIC;
36  $f = $DIC->ui()->factory();
37  $r = $DIC->ui()->renderer();
38  $d = new DataFactory();
39 
40  $pagination = $f
41  ->input()
42  ->viewControl()
43  ->pagination()
44  ->withTotalCount(932)
45  ->withValue([Pagination::FNAME_OFFSET => 31, Pagination::FNAME_LIMIT => 10]);
46 
47  $sortation = $f->input()->viewControl()->sortation([
48  'Field 1, ascending' => $d->order('field1', Order::ASC),
49  'Field 1, descending' => $d->order('field1', Order::DESC),
50  'Field 2, descending' => $d->order('field2', Order::DESC),
51  ]);
52 
53  $group = $f->input()->viewControl()->group([$pagination, $sortation]);
54 
55  // view this in a ViewControlContainer with active request
56  $vc_container = $f->input()->container()->viewControl()->standard([$group])->withRequest(
57  $DIC->http()->request()
58  );
59 
60  return $r->render([
61  $f->legacy()->content('<pre>' . print_r($vc_container->getData(), true) . '</pre>'),
62  $vc_container
63  ]);
64 }
base()
expected output: > ILIAS shows the rendered Component.
Definition: base.php:33
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:22
const DESC
Definition: Order.php:31
$r