ILIAS  release_8 Revision v8.23
base.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
10 
11 function base(): string
12 {
13  global $DIC;
14  $f = $DIC->ui()->factory();
15  $r = $DIC->ui()->renderer();
16  $d = new DataFactory();
17 
18  $pagination = $f
19  ->input()
20  ->viewControl()
21  ->pagination()
22  ->withTotalCount(932)
23  ->withValue([Pagination::FNAME_OFFSET => 31, Pagination::FNAME_LIMIT => 10]);
24 
25  $sortation = $f->input()->viewControl()->sortation([
26  'Field 1, ascending' => $d->order('field1', Order::ASC),
27  'Field 1, descending' => $d->order('field1', Order::DESC),
28  'Field 2, descending' => $d->order('field2', Order::DESC),
29  ]);
30 
31  $group = $f->input()->viewControl()->group([$pagination, $sortation]);
32 
33  // view this in a ViewControlContainer with active request
34  $vc_container = $f->input()->container()->viewControl()->standard([$group])->withRequest(
35  $DIC->http()->request()
36  );
37 
38  return $r->render([
39  $f->legacy('<pre>' . print_r($vc_container->getData(), true) . '</pre>'),
40  $vc_container
41  ]);
42 }
global $DIC
Definition: feed.php:28
const DESC
Definition: Order.php:15
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296