3 declare(strict_types=1);
15 $f = $DIC[
'ui.factory'];
16 $r = $DIC[
'ui.renderer'];
18 $dummy_records = [2, 13, 4, 5, 16, 17];
21 'b1' =>
$f->table()->column()->boolean(
'yes/no',
'yes',
'no'),
22 'b2' =>
$f->table()->column()->boolean(
"0/1",
"1",
"0"),
23 'b3' =>
$f->table()->column()->boolean(
25 $f->symbol()->icon()->custom(
'templates/default/images/standard/icon_checked.svg',
'',
'small'),
26 $f->symbol()->icon()->custom(
'templates/default/images/standard/icon_unchecked.svg',
'',
'small')
28 'b4' =>
$f->table()->column()->boolean(
30 $f->symbol()->glyph()->like(),
31 $f->symbol()->glyph()->dislike()->withHighlight()
35 $data_retrieval =
new class ($dummy_records) implements
I\
DataRetrieval {
36 protected array $records;
41 $this->records = $dummy_records;
44 public function getRows(
45 I\DataRowBuilder $row_builder,
46 array $visible_column_ids,
50 ?array $additional_parameters
52 foreach ($this->records as $number) {
54 $record[
'b1'] = $number > 10;
55 $record[
'b2'] = $record[
'b1'];
56 $record[
'b3'] = $record[
'b1'];
57 $record[
'b4'] = $record[
'b1'];
58 yield $row_builder->buildDataRow($row_id, $record);
62 public function getTotalRowCount(
64 ?array $additional_parameters
66 return count($this->records);
70 $table =
$f->table()->data(
'Boolean Columns', $columns, $data_retrieval)
71 ->withRequest($DIC->http()->request());
72 return $r->render($table);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Both the subject and the direction need to be specified when expressing an order. ...
__construct()
Constructor setup ILIAS global object public.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A simple class to express a range of whole positive numbers.