ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
34 function 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:28
global $DIC
Definition: shib_login.php:22
base()
expected output: > There&#39;s a button with the sort glyph as a label.
Definition: base.php:34
$r