ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMMTopLinkItemRenderer.php
Go to the documentation of this file.
1<?php
2
7
14{
15
19 const BLANK = "_blank";
20 const TOP = "_top";
21
22
29 public function getComponentForItem(isItem $item) : Component
30 {
34 $tpl = new ilTemplate("tpl.mm_top_link_item.html", false, false, 'Services/MainMenu');
35 $tpl->setVariable("TITLE", $item->getTitle());
36 $tpl->setVariable("HREF", $item->getAction());
37 $tpl->setVariable("TARGET", $item->isLinkWithExternalAction() ? self::BLANK : self::TOP);
38 $tpl->setVariable("ID", "mm_" . $item->getProviderIdentification()->getInternalIdentifier());
39
40 return $this->ui_factory->legacy($tpl->get());
41 }
42}
$tpl
Definition: ilias.php:10
An exception for terminatinating execution or to throw for unit testing.
Class ilMMTopLinkItemRenderer.
special template class to simplify handling of ITX/PEAR
A component is the most general form of an entity in the UI.
Definition: Component.php:14