ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
small.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
18 function small()
19 {
20  //Loading factories
21  global $DIC;
22  $f = $DIC->ui()->factory();
23  $renderer = $DIC->ui()->renderer();
24 
25  $options = array(
26  'default_option' => 'Default Ordering',
27  'latest' => 'Most Recent Ordering',
28  'oldest' => 'Oldest Ordering'
29  );
30 
31  //Hide the label
32  $s = $f->viewControl()->sortation($options, 'oldest')
33  ->withTargetURL($DIC->http()->request()->getRequestTarget(), 'sortation');
34 
35  $item = $f->item()->standard("See the Viewcontrol in a toolbar")
36  ->withDescription("When space is limited, the label will be omitted.");
37  return $renderer->render(
38  $f->panel()->standard("Small space ", [$item])
39  ->withViewControls([$s])
40  );
41 }
$renderer
small()
description: > This can be used, when space is very scarce and the label cannot be displayed ...
Definition: small.php:18
global $DIC
Definition: shib_login.php:25