ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
base.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
11 
18 function base()
19 {
20  global $DIC;
21  $f = $DIC['ui.factory'];
22  $r = $DIC['ui.renderer'];
23 
24  $columns = [
25  't1' => $f->table()->column()->email("mail")
26  ];
27 
28  $data_retrieval = new class () implements I\DataRetrieval {
29  protected array $records = [
30  ['t1' => 'somebody@example.com'],
31  ['t1' => 'somebody_else@example.com']
32  ];
33 
34  public function getRows(
35  I\DataRowBuilder $row_builder,
36  array $visible_column_ids,
37  Range $range,
38  Order $order,
39  ?array $filter_data,
40  ?array $additional_parameters
41  ): \Generator {
42  foreach ($this->records as $idx => $record) {
43  $row_id = '';
44  yield $row_builder->buildDataRow($row_id, $record);
45  }
46  }
47 
48  public function getTotalRowCount(
49  ?array $filter_data,
50  ?array $additional_parameters
51  ): ?int {
52  return count($this->records);
53  }
54  };
55 
56  $table = $f->table()->data('eMail Columns', $columns, $data_retrieval)
57  ->withRequest($DIC->http()->request());
58  return $r->render($table);
59 }
Both the subject and the direction need to be specified when expressing an order. ...
Definition: Order.php:12
global $DIC
Definition: shib_login.php:25
base()
expected output: > ILIAS shows the rendered Component.
Definition: base.php:18
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:28
$r