ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ 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\Table\Column\Text
;
22
23
use
ILIAS\UI\Implementation\Component\Table
as
T
;
24
use
ILIAS\UI\Component\Table
as
I
;
25
use
ILIAS\Data\Range
;
26
use
ILIAS\Data\Order
;
27
34
function
base
()
35
{
36
global
$DIC
;
37
$f
= $DIC[
'ui.factory'
];
38
$r
= $DIC[
'ui.renderer'
];
39
40
$columns = [
41
't1'
=>
$f
->table()->column()->text(
"some text"
)
42
];
43
44
$dummy_records = [
45
[
't1'
=>
'this is some text'
],
46
[
't1'
=>
'this is some other text'
]
47
];
48
49
$data_retrieval =
new
class
($dummy_records) implements
I
\DataRetrieval {
50
protected
array $records;
51
52
public
function
__construct
(array $dummy_records)
53
{
54
$this->records = $dummy_records;
55
}
56
57
public
function
getRows(
58
I
\DataRowBuilder $row_builder,
59
array $visible_column_ids,
60
Range
$range
,
61
Order
$order,
62
?array $filter_data,
63
?array $additional_parameters
64
): \Generator {
65
foreach
($this->records as $idx => $record) {
66
$row_id =
''
;
67
yield $row_builder->buildDataRow($row_id, $record);
68
}
69
}
70
71
public
function
getTotalRowCount(
72
?array $filter_data,
73
?array $additional_parameters
74
): ?
int
{
75
return
count($this->records);
76
}
77
};
78
79
$table =
$f
->table()->data($data_retrieval,
'Text Columns'
, $columns)
80
->withRequest($DIC->http()->request());
81
return
$r
->render($table);
82
}
Order
ILIAS\UI\Implementation
ILIAS\UI\Implementation\Component\Table
Definition:
AbstractTable.php:21
Range
ILIAS\Data\Order
Both the subject and the direction need to be specified when expressing an order. ...
Definition:
Order.php:28
ILIAS\__construct
__construct()
Constructor setup ILIAS global object public.
Definition:
class.ilias.php:76
Vendor\Package\$f
$f
Definition:
example_cleaned.php:49
$DIC
global $DIC
Definition:
shib_login.php:26
ILIAS\UI\Component\Table
ILIAS\UI\Implementation\Component\Table\$range
Range $range
Definition:
TableViewControlPagination.php:30
ILIAS\UI\examples\Table\Column\Text\base
base()
expected output: > ILIAS shows the rendered Component.
Definition:
base.php:34
ILIAS\UI\examples\Table\Column\Text
Definition:
base.php:21
ILIAS\Data\Range
A simple class to express a naive range of whole positive numbers.
Definition:
Range.php:28
$r
$r
Definition:
shib_logout.php:142
components
ILIAS
UI
src
examples
Table
Column
Text
base.php
Generated on Sun Aug 31 2025 23:04:09 for ILIAS by
1.8.13 (using
Doxyfile
)