3 declare(strict_types=1);
21 $f = $DIC[
'ui.factory'];
22 $r = $DIC[
'ui.renderer'];
24 $dummy_records = [2, 13, 4, 5, 16, 17];
27 'b1' =>
$f->table()->column()->boolean(
'yes/no',
'yes',
'no'),
28 'b2' =>
$f->table()->column()->boolean(
"0/1",
"1",
"0"),
29 'b3' =>
$f->table()->column()->boolean(
31 $f->symbol()->icon()->custom(
'assets/images/standard/icon_checked.svg',
'',
'small'),
32 $f->symbol()->icon()->custom(
'assets/images/standard/icon_unchecked.svg',
'',
'small')
34 'b4' =>
$f->table()->column()->boolean(
36 $f->symbol()->glyph()->like(),
37 $f->symbol()->glyph()->dislike()->withHighlight()
42 $data_retrieval =
new class ($dummy_records) implements
I\DataRetrieval {
43 protected array $records;
48 $this->records = $dummy_records;
51 public function getRows(
52 I\DataRowBuilder $row_builder,
53 array $visible_column_ids,
57 ?array $additional_parameters
59 foreach ($this->records as $number) {
61 $record[
'b1'] = $number > 10;
62 $record[
'b2'] = $record[
'b1'];
63 $record[
'b3'] = $record[
'b1'];
64 $record[
'b4'] = $record[
'b1'];
65 yield $row_builder->buildDataRow($row_id, $record);
69 public function getTotalRowCount(
71 ?array $additional_parameters
73 return count($this->records);
77 $table =
$f->table()->data(
'Boolean Columns', $columns, $data_retrieval)
78 ->withRequest($DIC->http()->request());
79 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.