ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMMTopParentItemRenderer Class Reference

Class ilMMTopParentItemRenderer. More...

+ Inheritance diagram for ilMMTopParentItemRenderer:
+ Collaboration diagram for ilMMTopParentItemRenderer:

Protected Member Functions

 addEntry (ilGroupedListGUI $gl, hasTitle $child, string $identifier)
 

Private Member Functions

 handleSeparator ($child, $gl)
 
 handleAsyncContent ($child, $gl)
 
 handleContent (hasContent $child, $gl)
 
 handleLinkList ($child, $gl, $i)
 

Additional Inherited Members

- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\BaseTypeRenderer
 __construct ()
 BaseTypeRenderer constructor. More...
 
 getComponentForItem (isItem $item)
 @inheritDoc More...
 
 getComponentForItem (isItem $item)
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\BaseTypeRenderer
 $ui_factory
 

Detailed Description

Member Function Documentation

◆ addEntry()

ilMMTopParentItemRenderer::addEntry ( ilGroupedListGUI  $gl,
hasTitle  $child,
string  $identifier 
)
protected
Parameters
ilGroupedListGUI$gl
hasTitle | isItem$child
string$identifier

Definition at line 104 of file class.ilMMTopParentItemRenderer.php.

105 {
106 $target = $child instanceof hasAction ? ($child->isLinkWithExternalAction() ? "_blank" : "_top") : "_top";
107 $href = ($child instanceof hasAction) ? $child->getAction() : "#";
108 $tooltip = ilHelp::getMainMenuTooltip($identifier);
109 $a_id = "mm_" . $child->getProviderIdentification()->getInternalIdentifier();
110 $gl->addEntry(
111 $child->getTitle(),
112 $href,
113 $target,
114 "",
115 "",
116 $a_id,
117 $tooltip,
118 "left center",
119 "right center",
120 false
121 );
122 }
addEntry( $a_content, $a_href="", $a_target="", $a_onclick="", $a_add_class="", $a_id="", $a_ttip="", $a_tt_my="right center", $a_tt_at="left center", $a_tt_use_htmlspecialchars=true)
Add entry.
static getMainMenuTooltip($a_item_id)
Get main menu tooltip.
$target
Definition: test.php:19

References $target, ilGroupedListGUI\addEntry(), ilHelp\getMainMenuTooltip(), and ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasTitle\getTitle().

Referenced by handleLinkList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleAsyncContent()

ilMMTopParentItemRenderer::handleAsyncContent (   $child,
  $gl 
)
private
Parameters
$child
$gl
Exceptions
ilTemplateException

Definition at line 131 of file class.ilMMTopParentItemRenderer.php.

132 {
133 $identifier = $child->getProviderIdentification()->getInternalIdentifier();
134 $atpl = new ilTemplate("tpl.self_loading_item.html", false, false, 'Services/MainMenu');
135 $atpl->setVariable("ASYNC_URL", $child->getAsyncContentURL());
136 $gl->addEntry(
137 $atpl->get(),
138 "#",
139 "_top",
140 "",
141 "",
142 $identifier,
143 ilHelp::getMainMenuTooltip($identifier),
144 "left center",
145 "right center",
146 false
147 );
148 }
special template class to simplify handling of ITX/PEAR

References ilHelp\getMainMenuTooltip().

+ Here is the call graph for this function:

◆ handleContent()

ilMMTopParentItemRenderer::handleContent ( hasContent  $child,
  $gl 
)
private
Parameters
$child
$gl
Exceptions
ilTemplateException

Definition at line 157 of file class.ilMMTopParentItemRenderer.php.

158 {
159 global $DIC;
160 $identifier = $child->getProviderIdentification()->getInternalIdentifier();
161 $gl->addEntry(
162 $DIC->ui()->renderer()->render($child->getContent()),
163 "#",
164 "_top",
165 "",
166 "",
167 $identifier,
168 ilHelp::getMainMenuTooltip($identifier),
169 "left center",
170 "right center",
171 false
172 );
173 }
global $DIC
Definition: saml.php:7

References $DIC, ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasContent\getContent(), and ilHelp\getMainMenuTooltip().

+ Here is the call graph for this function:

◆ handleLinkList()

ilMMTopParentItemRenderer::handleLinkList (   $child,
  $gl,
  $i 
)
private
Parameters
$child
$gl
$i

Definition at line 181 of file class.ilMMTopParentItemRenderer.php.

182 {
183 if (count($child->getLinks()) > 0) {
184 $gl->addGroupHeader($child->getTitle());
185 foreach ($child->getLinks() as $link) {
186 $this->addEntry($gl, $link, $i);
187 }
188 }
189 }
addEntry(ilGroupedListGUI $gl, hasTitle $child, string $identifier)
$i
Definition: disco.tpl.php:19

References $i, and addEntry().

+ Here is the call graph for this function:

◆ handleSeparator()

ilMMTopParentItemRenderer::handleSeparator (   $child,
  $gl 
)
private
Parameters
$child
$gl

Definition at line 89 of file class.ilMMTopParentItemRenderer.php.

90 {
91 if ($child->isTitleVisible()) {
92 $gl->addGroupHeader($child->getTitle());
93 } else {
94 $gl->addSeparator();
95 }
96 }

The documentation for this class was generated from the following file: