ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
11 
12 function base()
13 {
14  global $DIC;
15  $f = $DIC['ui.factory'];
16  $r = $DIC['ui.renderer'];
17 
18  $columns = [
19  't1' => $f->table()->column()->status("status")
20  ];
21 
22  $data_retrieval = new class () implements I\DataRetrieval {
23  protected array $records = [
24  ['t1' => 'unknown'],
25  ['t1' => 'incomplete'],
26  ['t1' => 'failed'],
27  ['t1' => 'passed'],
28  ['t1' => 'completed']
29  ];
30 
31  public function getRows(
32  I\DataRowBuilder $row_builder,
33  array $visible_column_ids,
34  Range $range,
35  Order $order,
36  ?array $filter_data,
37  ?array $additional_parameters
38  ): \Generator {
39  foreach ($this->records as $idx => $record) {
40  $row_id = '';
41  yield $row_builder->buildDataRow($row_id, $record);
42  }
43  }
44 
45  public function getTotalRowCount(
46  ?array $filter_data,
47  ?array $additional_parameters
48  ): ?int {
49  return count($this->records);
50  }
51  };
52 
53  $table = $f->table()->data('Status Columns', $columns, $data_retrieval)
54  ->withRequest($DIC->http()->request());
55  return $r->render($table);
56 }
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. ...
Definition: Order.php:12
global $DIC
Definition: feed.php:28
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.
Definition: Range.php:30