19declare(strict_types=1);
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,
72 mixed $additional_viewcontrol_data,
74 mixed $additional_parameters
76 foreach ($this->records as $number) {
78 $record[
'b1'] = $number > 10;
79 $record[
'b2'] = $record[
'b1'];
80 $record[
'b3'] = $record[
'b1'];
81 $record[
'b4'] = $record[
'b1'];
82 yield $row_builder->buildDataRow($row_id, $record);
86 public function getTotalRowCount(
87 mixed $additional_viewcontrol_data,
89 mixed $additional_parameters
91 return count($this->records);
95 $table =
$f->table()->data($data_retrieval,
'Boolean Columns', $columns)
96 ->withRequest(
$DIC->http()->request());
97 return $r->render($table);
Both the subject and the direction need to be specified when expressing an order.
A simple class to express a naive range of whole positive numbers.
__construct()
Constructor setup ILIAS global object @access public.