ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
_Base.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\examples\ViewControl\Sortation
;
22
35
function
_Base
()
36
{
37
//Load factories
38
global
$DIC
;
39
$f
=
$DIC
->ui()->factory();
40
$renderer
=
$DIC
->ui()->renderer();
41
$refinery
=
$DIC
->refinery();
42
$request_wrapper
=
$DIC
->http()->wrapper()->query();
43
44
//Initialize options
45
$options = [
46
'default_option'
=>
'Default'
,
47
'latest'
=>
'Most Recent'
,
48
'oldest'
=>
'Oldest'
49
];
50
51
//Note that the selected option needs to be displayed in the label
52
$select_option =
'default_option'
;
53
if
(
$request_wrapper
->has(
'sortation'
) &&
$request_wrapper
->retrieve(
'sortation'
,
$refinery
->kindlyTo()->string())) {
54
$select_option =
$request_wrapper
->retrieve(
'sortation'
,
$refinery
->kindlyTo()->string());
55
}
56
57
//Generate the UI Component
58
$s =
$f
->viewControl()->sortation($options, $select_option)
59
->withTargetURL(
$DIC
->http()->request()->getRequestTarget(),
'sortation'
);
60
61
//Rendering
62
return
$renderer
->render($s);
63
}
$renderer
$renderer
Definition:
build_bootstrap.php:83
ILIAS\UI\examples\Layout\Page\Standard\$request_wrapper
$request_wrapper
Definition:
ui.php:136
ILIAS\UI\examples\Layout\Page\Standard\$refinery
$refinery
Definition:
ui.php:137
ILIAS\UI\examples\ViewControl\Sortation
Definition:
_Base.php:21
ILIAS\UI\examples\ViewControl\Sortation\_Base
_Base()
Definition:
_Base.php:35
Vendor\Package\$f
$f
Definition:
example_cleaned.php:49
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
UI
src
examples
ViewControl
Sortation
_Base.php
Generated on Sat Oct 18 2025 23:04:41 for ILIAS by
1.9.4 (using
Doxyfile
)