ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
base.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27
34function base()
35{
36 global $DIC;
37 $f = $DIC['ui.factory'];
38 $r = $DIC['ui.renderer'];
39
40 $columns = [
41 't1' => $f->table()->column()->status("status")
42 ];
43
44 $data_retrieval = new class () implements I\DataRetrieval {
45 protected array $records = [
46 ['t1' => 'unknown'],
47 ['t1' => 'incomplete'],
48 ['t1' => 'failed'],
49 ['t1' => 'passed'],
50 ['t1' => 'completed']
51 ];
52
53 public function getRows(
54 I\DataRowBuilder $row_builder,
55 array $visible_column_ids,
57 Order $order,
58 mixed $additional_viewcontrol_data,
59 mixed $filter_data,
60 mixed $additional_parameters
61 ): \Generator {
62 foreach ($this->records as $idx => $record) {
63 $row_id = '';
64 yield $row_builder->buildDataRow($row_id, $record);
65 }
66 }
67
68 public function getTotalRowCount(
69 mixed $additional_viewcontrol_data,
70 mixed $filter_data,
71 mixed $additional_parameters
72 ): ?int {
73 return count($this->records);
74 }
75 };
76
77 $table = $f->table()->data($data_retrieval, 'Status Columns', $columns)
78 ->withRequest($DIC->http()->request());
79 return $r->render($table);
80}
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:29
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:29