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

Class ilMMItemInformation. More...

+ Inheritance diagram for ilMMItemInformation:
+ Collaboration diagram for ilMMItemInformation:

Public Member Functions

 __construct ()
 ilMMItemInformation constructor. More...
 
 getPositionOfSubItem (isChild $child)
 
 getPositionOfTopItem (isTopItem $top_item)
 
 isItemActive (isItem $item)
 
 getParent (isChild $item)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\ItemInformation
 translateItemForUser (hasTitle $item)
 

Private Member Functions

 getPosition (isItem $item)
 

Private Attributes

 $translations = []
 
 $items = []
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ getParent()

ilMMItemInformation::getParent ( isChild  $item)

Implements ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\ItemInformation.

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

References $DIC, ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild\getParent(), and ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem\getProviderIdentification().

132  {
133  global $DIC;
134  $parent_string = $item->getProviderIdentification()->serialize();
135  if (isset($this->items[$parent_string]['parent_identification'])) {
136  return $DIC->globalScreen()->identification()->fromSerializedIdentification($this->items[$parent_string]['parent_identification']);
137  }
138 
139  return $item->getParent();
140  }
global $DIC
Definition: saml.php:7
+ Here is the call graph for this function:

◆ getPosition()

ilMMItemInformation::getPosition ( isItem  $item)
private

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

References ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem\getPosition(), and ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem\getProviderIdentification().

Referenced by getPositionOfSubItem(), and getPositionOfTopItem().

104  : int
105  {
106  if (isset($this->items[$item->getProviderIdentification()->serialize()]['position'])) {
107  return (int) $this->items[$item->getProviderIdentification()->serialize()]['position'];
108  }
109 
110  return $item->getPosition();
111  }
getPosition()
Return the default position for installation, this will be overridden by the configuration later...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPositionOfSubItem()

ilMMItemInformation::getPositionOfSubItem ( isChild  $child)

Implements ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\ItemInformation.

Definition at line 87 of file class.ilMMItemInformation.php.

References getPosition().

87  : int
88  {
89  $position = $this->getPosition($child);
90 
91  return $position;
92  }
+ Here is the call graph for this function:

◆ getPositionOfTopItem()

ilMMItemInformation::getPositionOfTopItem ( isTopItem  $top_item)

Implements ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\ItemInformation.

Definition at line 98 of file class.ilMMItemInformation.php.

References getPosition().

98  : int
99  {
100  return $this->getPosition($top_item);
101  }
+ Here is the call graph for this function:

◆ isItemActive()

ilMMItemInformation::isItemActive ( isItem  $item)

Implements ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\ItemInformation.

Definition at line 117 of file class.ilMMItemInformation.php.

References ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem\getProviderIdentification(), and ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem\isActive().

117  : bool
118  {
119  $serialize = $item->getProviderIdentification()->serialize();
120  if (isset($this->items[$serialize]['active'])) {
121  return $this->items[$serialize]['active'] === "1";
122  }
123 
124  return $item->isActive();
125  }
+ Here is the call graph for this function:

Field Documentation

◆ $items

ilMMItemInformation::$items = []
private

Definition at line 28 of file class.ilMMItemInformation.php.

◆ $translations

ilMMItemInformation::$translations = []
private

Definition at line 24 of file class.ilMMItemInformation.php.


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