ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
small.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
34function small()
35{
36 //Loading factories
37 global $DIC;
38 $f = $DIC->ui()->factory();
39 $renderer = $DIC->ui()->renderer();
40
41 $options = array(
42 'default_option' => 'Default Ordering',
43 'latest' => 'Most Recent Ordering',
44 'oldest' => 'Oldest Ordering'
45 );
46
47 //Hide the label
48 $s = $f->viewControl()->sortation($options, 'oldest')
49 ->withTargetURL($DIC->http()->request()->getRequestTarget(), 'sortation');
50
51 $item = $f->item()->standard("See the Viewcontrol in a toolbar")
52 ->withDescription("When space is limited, the label will be omitted.");
53 return $renderer->render(
54 $f->panel()->standard("Small space ", [$item])
55 ->withViewControls([$s])
56 );
57}
$renderer
global $DIC
Definition: shib_login.php:26