ILIAS  release_8 Revision v8.24
base.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6
7use ILIAS\Data\Factory as DataFactory;
10
11function 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}
Builds data types.
Definition: Factory.php:21
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:13
const DESC
Definition: Order.php:15
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
global $DIC
Definition: feed.php:28