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()->email("mail")
20  ];
21 
22  $data_retrieval = new class () implements I\DataRetrieval {
23  protected array $records = [
24  ['t1' => 'somebody@example.com'],
25  ['t1' => 'somebody_else@example.com']
26  ];
27 
28  public function getRows(
29  I\DataRowBuilder $row_builder,
30  array $visible_column_ids,
31  Range $range,
32  Order $order,
33  ?array $filter_data,
34  ?array $additional_parameters
35  ): \Generator {
36  foreach ($this->records as $idx => $record) {
37  $row_id = '';
38  yield $row_builder->buildDataRow($row_id, $record);
39  }
40  }
41 
42  public function getTotalRowCount(
43  ?array $filter_data,
44  ?array $additional_parameters
45  ): ?int {
46  return count($this->records);
47  }
48  };
49 
50  $table = $f->table()->data('eMail Columns', $columns, $data_retrieval)
51  ->withRequest($DIC->http()->request());
52  return $r->render($table);
53 }
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