ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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 mixed $additional_viewcontrol_data,
54 mixed $filter_data,
55 mixed $additional_parameters
56 ): Generator {
57 yield from [];
58 }
59
60 public function getTotalRowCount(
61 mixed $additional_viewcontrol_data,
62 mixed $filter_data,
63 mixed $additional_parameters
64 ): ?int {
65 return 0;
66 }
67 };
68
69 $table = $factory->table()->data(
70 $empty_retrieval,
71 'Empty Data Table',
72 [
73 'col1' => $factory->table()->column()->text('Column 1')
74 ->withIsSortable(false),
75 'col2' => $factory->table()->column()->number('Column 2')
76 ->withIsSortable(false),
77 ],
78 );
79
80 return $renderer->render($table->withRequest($request));
81}
$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