ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
async.php File Reference

Go to the source code of this file.

Functions

 async ()
 

Function Documentation

◆ async()

async ( )

Definition at line 3 of file async.php.

4{
5 //Loading factories
6 global $DIC;
7 $f = $DIC->ui()->factory();
8 $renderer = $DIC->ui()->renderer();
9
10 //Initializing the options, note that the label is taken care of by JS
11 $options = [
12 'default_option' => 'Default Ordering',
13 'latest' => 'Most Recent Ordering',
14 'oldest' => 'Oldest Ordering'
15 ];
16
17 //Note that the selected option needs to be displayed in the label
18 $select_option = 'default_option';
19 if ($_GET['sortation']) {
20 $select_option = $_GET['sortation'];
21 }
22
23 //Generation of the UI Component
24 $modal = $f->modal()->lightbox($f->modal()->lightboxTextPage('Note: This is just used to show case, how
25 this control can be used,to change an other components content.', "Sortation has changed: " . $options[$_GET['sortation']]));
26 $s = $f->viewControl()->sortation($options)
27 ->withTargetURL($DIC->http()->request()->getRequestTarget(), 'sortation')
28 ->withLabel($options[$select_option])
29 ->withOnSort($modal->getShowSignal());
30
31 //Rendering
32 return $renderer->render([$s,$modal]);
33}
$_GET["client_id"]
$DIC
Definition: xapitoken.php:46

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