ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMMEntryRendererGUI.php
Go to the documentation of this file.
1<?php
2
9{
10
16 public function getHTML() : string
17 {
18 $html = "";
19
20 // Plugin-Slot
21 $uip = new ilUIHookProcessor(
22 "Services/MainMenu",
23 "main_menu_list_entries",
24 array("main_menu_gui" => $this)
25 );
26
27 if (!$uip->replaced()) {
28 $html = $this->render();
29 }
30
31 $html = $uip->getHTML($html);
32
33 return $html;
34 }
35
36
42 protected function render() : string
43 {
44 global $DIC;
45
46 $top_items = (new ilMMItemRepository())->getStackedTopItemsForPresentation();
47 $tpl = new ilTemplate("tpl.main_menu_legacy.html", true, true, 'Services/MainMenu');
51 $components = [];
52
53 foreach ($top_items as $top_item) {
54 $components[] = $top_item->getTypeInformation()->getRenderer()->getComponentForItem($top_item);
55 }
56
57 $tpl->setVariable("ENTRIES", $DIC->ui()->renderer()->render($components));
58
59 return $tpl->get();
60 }
61}
$tpl
Definition: ilias.php:10
An exception for terminatinating execution or to throw for unit testing.
Class ilMMEntryRendererGUI.
Class ilMMItemRepository.
special template class to simplify handling of ITX/PEAR
UI interface hook processor.
$html
Definition: example_001.php:87
global $DIC
Definition: saml.php:7