19 declare(strict_types=1);
37 $f = $DIC[
'ui.factory'];
38 $r = $DIC[
'ui.renderer'];
40 $dummy_records = [2, 13, 4, 5, 16, 17];
43 'b1' =>
$f->table()->column()->boolean(
'yes/no',
'yes',
'no'),
44 'b2' =>
$f->table()->column()->boolean(
"0/1",
"1",
"0"),
45 'b3' =>
$f->table()->column()->boolean(
47 $f->symbol()->icon()->custom(
'assets/images/standard/icon_checked.svg',
'',
'small'),
48 $f->symbol()->icon()->custom(
'assets/images/standard/icon_unchecked.svg',
'',
'small')
50 'b4' =>
$f->table()->column()->boolean(
52 $f->symbol()->glyph()->like(),
53 $f->symbol()->glyph()->dislike()->withHighlight()
58 $data_retrieval =
new class ($dummy_records) implements
I\DataRetrieval {
59 protected array $records;
64 $this->records = $dummy_records;
67 public function getRows(
68 I\DataRowBuilder $row_builder,
69 array $visible_column_ids,
73 ?array $additional_parameters
75 foreach ($this->records as $number) {
77 $record[
'b1'] = $number > 10;
78 $record[
'b2'] = $record[
'b1'];
79 $record[
'b3'] = $record[
'b1'];
80 $record[
'b4'] = $record[
'b1'];
81 yield $row_builder->buildDataRow($row_id, $record);
85 public function getTotalRowCount(
87 ?array $additional_parameters
89 return count($this->records);
93 $table =
$f->table()->data($data_retrieval,
'Boolean Columns', $columns)
94 ->withRequest($DIC->http()->request());
95 return $r->render($table);
Both the subject and the direction need to be specified when expressing an order. ...
__construct()
Constructor setup ILIAS global object public.
A simple class to express a naive range of whole positive numbers.
base()
expected output: > ILIAS shows the rendered Component.