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
25
37function without_data(): string
38{
39 global $DIC;
40
41 $factory = $DIC->ui()->factory();
42 $renderer = $DIC->ui()->renderer();
43
44 $minimal_mapping = static fn(
45 PresentationRow $row,
46 mixed $record,
47 Factory $ui_factory,
48 mixed $environment
49 ): PresentationRow => $row;
50
51 $table = $factory->table()->presentation(
52 'Empty Presentation Table',
53 [$factory->viewControl()->mode(['All' => '#'], '')],
54 $minimal_mapping
55 );
56
57 // Note: this is an optional call, it should merely demonstrate that we have
58 // an empty table.
59 $table->withData([]);
60
61 return $renderer->render($table);
62}
$renderer
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
This describes a Row used in Presentation Table.
This is how the factory for UI elements looks.
Definition: Factory.php:38
global $DIC
Definition: shib_login.php:26