ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
base.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
10 
17 function base(): string
18 {
19  global $DIC;
20  $f = $DIC->ui()->factory();
21  $r = $DIC->ui()->renderer();
22  $d = new DataFactory();
23 
24  $pagination = $f
25  ->input()
26  ->viewControl()
27  ->pagination()
28  ->withTotalCount(932)
29  ->withValue([Pagination::FNAME_OFFSET => 31, Pagination::FNAME_LIMIT => 10]);
30 
31  $sortation = $f->input()->viewControl()->sortation([
32  'Field 1, ascending' => $d->order('field1', Order::ASC),
33  'Field 1, descending' => $d->order('field1', Order::DESC),
34  'Field 2, descending' => $d->order('field2', Order::DESC),
35  ]);
36 
37  $group = $f->input()->viewControl()->group([$pagination, $sortation]);
38 
39  // view this in a ViewControlContainer with active request
40  $vc_container = $f->input()->container()->viewControl()->standard([$group])->withRequest(
41  $DIC->http()->request()
42  );
43 
44  return $r->render([
45  $f->legacy('<pre>' . print_r($vc_container->getData(), true) . '</pre>'),
46  $vc_container
47  ]);
48 }
base()
expected output: > ILIAS shows the rendered Component.
Definition: base.php:17
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:25
$r