ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
without_data.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27use Generator;
28
39function without_data(): string
40{
41 global $DIC;
42
43 $factory = $DIC->ui()->factory();
44 $renderer = $DIC->ui()->renderer();
45 $request = $DIC->http()->request();
46
47 $empty_retrieval = new class () implements DataRetrieval {
48 public function getRows(
49 DataRowBuilder $row_builder,
50 array $visible_column_ids,
52 Order $order,
53 ?array $filter_data,
54 ?array $additional_parameters
55 ): Generator {
56 yield from [];
57 }
58
59 public function getTotalRowCount(?array $filter_data, ?array $additional_parameters): ?int
60 {
61 return 0;
62 }
63 };
64
65 $table = $factory->table()->data(
66 $empty_retrieval,
67 'Empty Data Table',
68 [
69 'col1' => $factory->table()->column()->text('Column 1')
70 ->withIsSortable(false),
71 'col2' => $factory->table()->column()->number('Column 2')
72 ->withIsSortable(false),
73 ],
74 );
75
76 return $renderer->render($table->withRequest($request));
77}
$renderer
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:29
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:29
global $DIC
Definition: shib_login.php:26