ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
_Base.php File Reference

Go to the source code of this file.

Functions

 _Base ()
 

Function Documentation

◆ _Base()

_Base ( )

Definition at line 4 of file _Base.php.

References $_GET, $DIC, and Vendor\Package\$f.

5 {
6  //Loading factories
7  global $DIC;
8  $f = $DIC->ui()->factory();
9  $renderer = $DIC->ui()->renderer();
10 
11  //Initializing the options
12  $options = [
13  'default_option' => 'Default Ordering',
14  'latest' => 'Most Recent Ordering',
15  'oldest' => 'Oldest Ordering'
16  ];
17 
18  //Note that the selected option needs to be displayed in the label
19  $select_option = 'default_option';
20  if ($_GET['sortation']) {
21  $select_option = $_GET['sortation'];
22  }
23 
24  //Generation of the UI Component
25  $s = $f->viewControl()->sortation($options)
26  ->withTargetURL($DIC->http()->request()->getRequestTarget(), 'sortation')
27  ->withLabel($options[$select_option]);
28 
29  //Rendering
30  return $renderer->render($s);
31 }
$_GET["client_id"]
$DIC
Definition: xapitoken.php:46