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)
 @inheritDoc More...
 
 getPositionOfTopItem (isTopItem $top_item)
 @inheritDoc More...
 
 isItemActive (isItem $item)
 @inheritDoc More...
 
 getParent (isChild $item)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\ItemInformation
 isItemActive (isItem $item)
 
 getPositionOfSubItem (isChild $child)
 
 getPositionOfTopItem (isTopItem $top_item)
 
 translateItemForUser (hasTitle $item)
 
 getParent (isChild $item)
 

Private Member Functions

 getPosition (isItem $item)
 

Private Attributes

 $translations = []
 
 $items = []
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMMItemInformation::__construct ( )

ilMMItemInformation constructor.

Parameters
StorageFacade$storage

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

37 {
38 $this->items = ilMMItemStorage::getArray('identification');
39 $this->translations = ilMMItemTranslationStorage::getArray('id', 'translation');
40 }
static getArray($key=null, $values=null)

References ActiveRecord\getArray().

+ Here is the call graph for this function:

Member Function Documentation

◆ getParent()

ilMMItemInformation::getParent ( isChild  $item)

@inheritDoc

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

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

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

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

+ Here is the call graph for this function:

◆ getPosition()

ilMMItemInformation::getPosition ( isItem  $item)
private

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

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.

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

Referenced by getPositionOfSubItem(), and getPositionOfTopItem().

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

◆ getPositionOfSubItem()

ilMMItemInformation::getPositionOfSubItem ( isChild  $child)

@inheritDoc

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

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

87 : int
88 {
89 $position = $this->getPosition($child);
90
91 return $position;
92 }

References getPosition().

+ Here is the call graph for this function:

◆ getPositionOfTopItem()

ilMMItemInformation::getPositionOfTopItem ( isTopItem  $top_item)

@inheritDoc

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

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

98 : int
99 {
100 return $this->getPosition($top_item);
101 }

References getPosition().

+ Here is the call graph for this function:

◆ isItemActive()

ilMMItemInformation::isItemActive ( isItem  $item)

@inheritDoc

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

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

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 }

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

+ 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: