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
24
34function base()
35{
36 global $DIC;
37 $f = $DIC['ui.factory'];
38 $r = $DIC['ui.renderer'];
39
40 //construct with labels and options
41 $sortation = $f->input()->viewControl()->sortation([
42 'Field 1, ascending' => new Order('field1', 'ASC'),
43 'Field 1, descending' => new Order('field1', 'DESC'),
44 'Field 2, descending' => new Order('field2', 'DESC'),
45
46 ]);
47
48 //wrap the control in a ViewControlContainer
49 $vc_container = $f->input()->container()->viewControl()->standard([$sortation])
50 ->withRequest($DIC->http()->request());
51
52 return $r->render([
53 $f->legacy()->content('<pre>' . print_r($vc_container->getData(), true) . '</pre>'),
54 $f->divider()->horizontal(),
55 $vc_container
56 ]);
57}
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:29
global $DIC
Definition: shib_login.php:26