ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
base.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
ILIAS\UI\examples\Table\Column\Text
;
6
7
use
ILIAS\UI\Implementation\Component\Table
as
T
;
8
use
ILIAS\UI\Component\Table
as
I
;
9
use
ILIAS\Data\Range
;
10
use
ILIAS\Data\Order
;
11
18
function
base
()
19
{
20
global
$DIC
;
21
$f
= $DIC[
'ui.factory'
];
22
$r
= $DIC[
'ui.renderer'
];
23
24
$columns = [
25
't1'
=>
$f
->table()->column()->text(
"some text"
)
26
];
27
28
$dummy_records = [
29
[
't1'
=>
'this is some text'
],
30
[
't1'
=>
'this is some other text'
]
31
];
32
33
$data_retrieval =
new
class
($dummy_records) implements
I
\DataRetrieval {
34
protected
array $records;
35
36
public
function
__construct
(array $dummy_records)
37
{
38
$this->records = $dummy_records;
39
}
40
41
public
function
getRows(
42
I
\DataRowBuilder $row_builder,
43
array $visible_column_ids,
44
Range
$range
,
45
Order
$order,
46
?array $filter_data,
47
?array $additional_parameters
48
): \Generator {
49
foreach
($this->records as $idx => $record) {
50
$row_id =
''
;
51
yield $row_builder->buildDataRow($row_id, $record);
52
}
53
}
54
55
public
function
getTotalRowCount(
56
?array $filter_data,
57
?array $additional_parameters
58
): ?
int
{
59
return
count($this->records);
60
}
61
};
62
63
$table =
$f
->table()->data(
'Text Columns'
, $columns, $data_retrieval)
64
->withRequest($DIC->http()->request());
65
return
$r
->render($table);
66
}
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:12
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:25
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:18
ILIAS\UI\examples\Table\Column\Text
Definition:
base.php:5
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:137
components
ILIAS
UI
src
examples
Table
Column
Text
base.php
Generated on Wed Sep 10 2025 15:16:44 for ILIAS by
1.8.13 (using
Doxyfile
)