ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
without_data.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
9 
14 function without_data(): string
15 {
16  global $DIC;
17 
18  $factory = $DIC->ui()->factory();
19  $renderer = $DIC->ui()->renderer();
20 
21  $minimal_mapping = static fn(
22  PresentationRow $row,
23  mixed $record,
24  Factory $ui_factory,
25  mixed $environment
26  ): PresentationRow => $row;
27 
28  $table = $factory->table()->presentation(
29  'Empty Presentation Table',
30  [$factory->viewControl()->mode(['All' => '#'], '')],
31  $minimal_mapping
32  );
33 
34  // Note: this is an optional call, it should merely demonstrate that we have
35  // an empty table.
36  $table->withData([]);
37 
38  return $renderer->render($table);
39 }
without_data()
Example showing a presentation table without any data and hence no entries, which will automatically ...
global $DIC
Definition: feed.php:28
This describes a Row used in Presentation Table.