ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
base.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\Data\Factory as DataFactory;
26
33function 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}
Builds data types.
Definition: Factory.php:36
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:29
const DESC
Definition: Order.php:31
global $DIC
Definition: shib_login.php:26