ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
34 function base()
35 {
36  global $DIC;
37  $f = $DIC['ui.factory'];
38  $r = $DIC['ui.renderer'];
39 
40  $columns = [
41  't1' => $f->table()->column()->email("mail")
42  ];
43 
44  $data_retrieval = new class () implements I\DataRetrieval {
45  protected array $records = [
46  ['t1' => 'somebody@example.com'],
47  ['t1' => 'somebody_else@example.com']
48  ];
49 
50  public function getRows(
51  I\DataRowBuilder $row_builder,
52  array $visible_column_ids,
53  Range $range,
54  Order $order,
55  ?array $filter_data,
56  ?array $additional_parameters
57  ): \Generator {
58  foreach ($this->records as $idx => $record) {
59  $row_id = '';
60  yield $row_builder->buildDataRow($row_id, $record);
61  }
62  }
63 
64  public function getTotalRowCount(
65  ?array $filter_data,
66  ?array $additional_parameters
67  ): ?int {
68  return count($this->records);
69  }
70  };
71 
72  $table = $f->table()->data($data_retrieval, 'eMail Columns', $columns)
73  ->withRequest($DIC->http()->request());
74  return $r->render($table);
75 }
Both the subject and the direction need to be specified when expressing an order. ...
Definition: Order.php:28
global $DIC
Definition: shib_login.php:22
base()
expected output: > ILIAS shows the rendered Component.
Definition: base.php:34
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:28
$r