Go to the source code of this file.
◆ async()
Definition at line 3 of file async.php.
4{
5
8 $renderer =
$DIC->ui()->renderer();
9
10
11 $options = [
12 'default_option' => 'Default Ordering',
13 'latest' => 'Most Recent Ordering',
14 'oldest' => 'Oldest Ordering'
15 ];
16
17
18 $select_option = 'default_option';
19 if (
$_GET[
'sortation']) {
20 $select_option =
$_GET[
'sortation'];
21 }
22
23
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
32 return $renderer->render([$s,$modal]);
33}
References $_GET, $DIC, and Vendor\Package\$f.