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\Input\ViewControl\Group
;
22
23
use
ILIAS\Data\Factory
as DataFactory;
24
use
ILIAS\Data\Order
;
25
use
ILIAS\UI\Implementation\Component\Input\ViewControl\Pagination
;
26
33
function
base
(): string
34
{
35
global
$DIC
;
36
$f
=
$DIC
->ui()->factory();
37
$r =
$DIC
->ui()->renderer();
38
$d
=
new
DataFactory();
39
40
$pagination =
$f
41
->input()
42
->viewControl()
43
->pagination()
44
->withTotalCount(932)
45
->withValue([
Pagination::FNAME_OFFSET
=> 31,
Pagination::FNAME_LIMIT
=> 10]);
46
47
$sortation =
$f
->input()->viewControl()->sortation([
48
'Field 1, ascending'
=>
$d
->order(
'field1'
,
Order::ASC
),
49
'Field 1, descending'
=>
$d
->order(
'field1'
,
Order::DESC
),
50
'Field 2, descending'
=>
$d
->order(
'field2'
,
Order::DESC
),
51
]);
52
53
$group =
$f
->input()->viewControl()->group([$pagination, $sortation]);
54
55
// view this in a ViewControlContainer with active request
56
$vc_container =
$f
->input()->container()->viewControl()->standard([$group])->withRequest(
57
$DIC
->http()->request()
58
);
59
60
return
$r->render([
61
$f
->legacy()->content(
'<pre>'
. print_r($vc_container->getData(),
true
) .
'</pre>'
),
62
$vc_container
63
]);
64
}
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:36
ILIAS\Data\Order
Both the subject and the direction need to be specified when expressing an order.
Definition:
Order.php:29
ILIAS\Data\Order\DESC
const DESC
Definition:
Order.php:31
ILIAS\Data\Order\ASC
const ASC
Definition:
Order.php:30
ILIAS\UI\Implementation\Component\Input\ViewControl\Pagination
Definition:
Pagination.php:35
ILIAS\UI\Implementation\Component\Input\ViewControl\Pagination\FNAME_LIMIT
const FNAME_LIMIT
Definition:
Pagination.php:41
ILIAS\UI\Implementation\Component\Input\ViewControl\Pagination\FNAME_OFFSET
const FNAME_OFFSET
Definition:
Pagination.php:40
ILIAS\UI\examples\Input\ViewControl\Group
Definition:
base.php:21
ILIAS\UI\examples\Input\ViewControl\Group\base
base()
Definition:
base.php:33
Vendor\Package\$d
$d
Definition:
example_cleaned.php:49
Vendor\Package\$f
$f
Definition:
example_cleaned.php:49
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
UI
src
examples
Input
ViewControl
Group
base.php
Generated on Sat Oct 18 2025 23:04:39 for ILIAS by
1.9.4 (using
Doxyfile
)