ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDashObjectsTableRenderer.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected object $parent_gui;
24
25 public function __construct(object $parent_gui)
26 {
27 $this->parent_gui = $parent_gui;
28 }
29
30 public function render(array $groupedItems): string
31 {
32 $cnt = 0;
33 $html = '';
34 foreach ($groupedItems as $group) {
35 $items = $group->getItems();
36 if (count($items) > 0) {
37 $table = new ilDashObjectsTableGUI($this->parent_gui, 'render', $cnt++);
38 $table->setTitle($group->getLabel());
39 $table->setData($group->getItems());
40 $html .= $table->getHTML();
41 }
42 }
43 return $html;
44 }
45}