ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
RowFactory.php
Go to the documentation of this file.
1
<?php declare(strict_types=1);
2
3
/* Copyright (c) 2020 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5
namespace
ILIAS\UI\Implementation\Component\Table
;
6
7
use
ILIAS\UI\Component\Table
as
T
;
8
9
class
RowFactory
implements
T\RowFactory
10
{
14
protected
$cell_transformations
;
15
16
public
function
__construct
(array
$cell_transformations
)
17
{
18
$this->cell_transformations =
$cell_transformations
;
19
}
20
21
public
function
map
(array $record) : array
22
{
23
$row = [];
24
foreach
(array_keys($this->cell_transformations) as $id) {
25
$row[$id] =
''
;
26
if
(array_key_exists($id, $record)) {
27
foreach
($this->cell_transformations[$id] as $trafo) {
28
$row[$id] = $trafo($record[$id]);
29
}
30
}
31
}
32
return
$row;
33
}
34
}
ILIAS\UI\Implementation\Component\Table\RowFactory\map
map(array $record)
Definition:
RowFactory.php:21
ILIAS\UI\Implementation\Component\Table
ILIAS\UI\Component\Table\RowFactory
Definition:
RowFactory.php:5
ILIAS\UI\Implementation\Component\Table\RowFactory\__construct
__construct(array $cell_transformations)
Definition:
RowFactory.php:16
ILIAS\UI\Component\Table
ILIAS\UI\Implementation\Component\Table\RowFactory
Definition:
RowFactory.php:9
ILIAS\UI\Implementation\Component\Table\RowFactory\$cell_transformations
$cell_transformations
Definition:
RowFactory.php:14
src
UI
Implementation
Component
Table
RowFactory.php
Generated on Wed Sep 3 2025 21:01:46 for ILIAS by
1.8.13 (using
Doxyfile
)