ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
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  $df = new \ILIAS\Data\Factory();
40 
41  $columns = [
42  'd1' => $f->table()->column()->date("German Long", $df->dateFormat()->germanLong()),
43  'd2' => $f->table()->column()->date("German Short", $df->dateFormat()->germanShort())
44  ];
45 
46  $data_retrieval = new class () implements I\DataRetrieval {
47  public function getRows(
48  I\DataRowBuilder $row_builder,
49  array $visible_column_ids,
50  Range $range,
51  Order $order,
52  ?array $filter_data,
53  ?array $additional_parameters
54  ): \Generator {
55  $row_id = '';
56  $dat = new \DateTimeImmutable();
57  $record = [
58  'd1' => $dat,
59  'd2' => $dat
60  ];
61  yield $row_builder->buildDataRow($row_id, $record);
62  }
63 
64  public function getTotalRowCount(
65  ?array $filter_data,
66  ?array $additional_parameters
67  ): ?int {
68  return 1;
69  }
70  };
71 
72  $table = $f->table()->data($data_retrieval, 'Date Columns', $columns)
73  ->withRequest($DIC->http()->request());
74  return $r->render($table);
75 }
base()
expected output: > ILIAS shows the rendered Component.
Definition: base.php:34
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
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:28
$r