ILIAS  release_8 Revision v8.24
base.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6
11
12function base()
13{
14 global $DIC;
15 $f = $DIC['ui.factory'];
16 $r = $DIC['ui.renderer'];
17 $df = new \ILIAS\Data\Factory();
18
19 $columns = [
20 'd1' => $f->table()->column()->date("German Long", $df->dateFormat()->germanLong()),
21 'd2' => $f->table()->column()->date("German Short", $df->dateFormat()->germanShort())
22 ];
23
24 $data_retrieval = new class () implements I\DataRetrieval {
25 public function getRows(
26 I\DataRowBuilder $row_builder,
27 array $visible_column_ids,
28 Range $range,
29 Order $order,
30 ?array $filter_data,
31 ?array $additional_parameters
32 ): \Generator {
33 $row_id = '';
34 $dat = new \DateTimeImmutable();
35 $record = [
36 'd1' => $dat,
37 'd2' => $dat
38 ];
39 yield $row_builder->buildDataRow($row_id, $record);
40 }
41
42 public function getTotalRowCount(
43 ?array $filter_data,
44 ?array $additional_parameters
45 ): ?int {
46 return 1;
47 }
48 };
49
50 $table = $f->table()->data('Date Columns', $columns, $data_retrieval)
51 ->withRequest($DIC->http()->request());
52 return $r->render($table);
53}
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:13
A simple class to express a range of whole positive numbers.
Definition: Range.php:31
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...