ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMMNullItemFacade Class Reference

Class ilMMNullItemFacade. More...

+ Inheritance diagram for ilMMNullItemFacade:
+ Collaboration diagram for ilMMNullItemFacade:

Public Member Functions

 __construct (IdentificationInterface $identification, Main $collector)
 
 isTopItem ()
 
 setIsTopItm (bool $top_item)
 
 isEmpty ()
 
 setActiveStatus (bool $status)
 
 setParent (string $parent)
 
 create ()
 
 isAvailable ()
 
 isAlwaysAvailable ()
 
 getProviderNameForPresentation ()
 
 isDeletable ()
 
 delete ()
 
 supportsRoleBasedVisibility ()
 
- Public Member Functions inherited from ilMMCustomItemFacade
 __construct (IdentificationInterface $identification, Main $collector)
 
 update ()
 
 delete ()
 
 supportsRoleBasedVisibility ()
 
 isCustom ()
 
 isEditable ()
 
 isDeletable ()
 
 getProviderNameForPresentation ()
 
 getStatus ()
 
 setAction (string $action)
 
 getType ()
 
 setType (string $type)
 
 isTopItem ()
 
 setIsTopItm (bool $top_item)
 
- Public Member Functions inherited from ilMMAbstractItemFacade
 __construct (\ILIAS\GlobalScreen\Identification\IdentificationInterface $identification, Main $collector)
 ilMMAbstractItemFacade constructor. More...
 
 getId ()
 
 hasStorage ()
 
 supportsRoleBasedVisibility ()
 
 hasRoleBasedVisibility ()
 
 setRoleBasedVisibility (bool $role_based_visibility)
 
 getGlobalRoleIDs ()
 
 setGlobalRoleIDs (array $global_role_ids)
 
 isEmpty ()
 
 itemStorage ()
 
 identification ()
 
 getRawItem ()
 
 getFilteredItem ()
 
 getAmountOfChildren ()
 
 isAvailable ()
 
 isActivated ()
 
 isAlwaysAvailable ()
 
 getProviderNameForPresentation ()
 
 getDefaultTitle ()
 
 setDefaultTitle (string $default_title)
 
 getStatus ()
 
 getTypeForPresentation ()
 
 getParentIdentificationString ()
 
 isCustomType ()
 
 isTopItem ()
 
 isChild ()
 
 isInLostItem ()
 
 setIsTopItm (bool $top_item)
 
 isInterchangeable ()
 
 getType ()
 FSX check if doublette . More...
 
 setParent (string $parent)
 
 setPosition (int $position)
 
Parameters
int$position
More...
 
 setActiveStatus (bool $status)
 
 supportsCustomIcon ()
 
 getIconID ()
 
 setIconID (string $icon_id)
 
 update ()
 
 create ()
 
 delete ()
 

Protected Attributes

 $top_item = false
 
- Protected Attributes inherited from ilMMCustomItemFacade
 $custom_item_storage
 
 $action = ''
 
 $type = ''
 
 $top_item = false
 
- Protected Attributes inherited from ilMMAbstractItemFacade
 $role_based_visibility = false
 
 $global_role_ids = []
 
 $type_information
 
 $mm_item
 
 $raw_item
 
 $filtered_item
 
 $identification
 
 $default_title = "-"
 

Private Attributes

 $parent_identification = ""
 
 $active_status
 

Additional Inherited Members

- Protected Member Functions inherited from ilMMAbstractItemFacade
 deleteAssociatedTranslations ()
 deletes all translations associated with the current identification. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMMNullItemFacade::__construct ( IdentificationInterface  $identification,
Main  $collector 
)

Definition at line 32 of file class.ilMMNullItemFacade.php.

References ilMMAbstractItemFacade\$identification, ILIAS\GlobalScreen\Provider\__construct(), and ilMMItemFacadeInterface\identification().

33  {
35  parent::__construct($identification, $collector);
36  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilMMNullItemFacade::create ( )
Returns
void

Implements ilMMItemFacadeInterface.

Definition at line 84 of file class.ilMMNullItemFacade.php.

References $DIC, ilMMItemFacadeInterface\identification(), ilMMItemFacadeInterface\isChild(), and isTopItem().

85  {
86  $s = new ilMMCustomItemStorage();
87  $s->setIdentifier(uniqid());
88  $s->setType($this->type);
89  $s->setTopItem($this->isTopItem());
90  $s->setAction($this->action);
91  $s->setDefaultTitle($this->default_title);
92  $s->create();
93 
94  $this->custom_item_storage = $s;
95 
96  global $DIC;
97  $provider = new CustomMainBarProvider($DIC);
98  $this->raw_item = $provider->getSingleCustomItem($s);
99  if ($this->parent_identification && $this->raw_item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild) {
100  global $DIC;
101  $this->raw_item = $this->raw_item->withParent($DIC->globalScreen()->identification()->fromSerializedIdentification($this->parent_identification));
102  }
103 
104  $this->identification = $this->raw_item->getProviderIdentification();
105 
106  $this->mm_item = new ilMMItemStorage();
107  $this->mm_item->setPosition(9999999); // always the last on the top item
108  $this->mm_item->setIdentification($this->raw_item->getProviderIdentification()->serialize());
109  $this->mm_item->setParentIdentification($this->parent_identification);
110  $this->mm_item->setActive($this->active_status);
111  if ($this->raw_item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild) {
112  $this->mm_item->setParentIdentification($this->raw_item->getParent()->serialize());
113  }
114 
115  parent::create();
116  }
Class ChatMainBarProvider .
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ delete()

ilMMNullItemFacade::delete ( )

Implements ilMMItemFacadeInterface.

Definition at line 155 of file class.ilMMNullItemFacade.php.

156  {
157  parent::delete();
158  }

◆ getProviderNameForPresentation()

ilMMNullItemFacade::getProviderNameForPresentation ( )

Implements ilMMItemFacadeInterface.

Definition at line 137 of file class.ilMMNullItemFacade.php.

References ilMMItemFacadeInterface\identification().

137  : string
138  {
139  return $this->identification->getProviderNameForPresentation();
140  }
+ Here is the call graph for this function:

◆ isAlwaysAvailable()

ilMMNullItemFacade::isAlwaysAvailable ( )

Implements ilMMItemFacadeInterface.

Definition at line 128 of file class.ilMMNullItemFacade.php.

128  : bool
129  {
130  return false;
131  }

◆ isAvailable()

ilMMNullItemFacade::isAvailable ( )
Returns
bool

Implements ilMMItemFacadeInterface.

Definition at line 119 of file class.ilMMNullItemFacade.php.

119  : bool
120  {
121  return false;
122  }

◆ isDeletable()

ilMMNullItemFacade::isDeletable ( )

Implements ilMMItemFacadeInterface.

Definition at line 146 of file class.ilMMNullItemFacade.php.

146  : bool
147  {
148  return true;
149  }

◆ isEmpty()

ilMMNullItemFacade::isEmpty ( )

Implements ilMMItemFacadeInterface.

Definition at line 60 of file class.ilMMNullItemFacade.php.

60  : bool
61  {
62  return true;
63  }

◆ isTopItem()

ilMMNullItemFacade::isTopItem ( )

Implements ilMMItemFacadeInterface.

Definition at line 42 of file class.ilMMNullItemFacade.php.

References $top_item.

Referenced by create().

42  : bool
43  {
44  return $this->top_item;
45  }
+ Here is the caller graph for this function:

◆ setActiveStatus()

ilMMNullItemFacade::setActiveStatus ( bool  $status)

Implements ilMMItemFacadeInterface.

Definition at line 69 of file class.ilMMNullItemFacade.php.

70  {
71  $this->active_status = $status;
72  }

◆ setIsTopItm()

ilMMNullItemFacade::setIsTopItm ( bool  $top_item)

Implements ilMMItemFacadeInterface.

Definition at line 51 of file class.ilMMNullItemFacade.php.

References $top_item.

52  {
53  $this->top_item = $top_item;
54  }

◆ setParent()

ilMMNullItemFacade::setParent ( string  $parent)

Implements ilMMItemFacadeInterface.

Definition at line 78 of file class.ilMMNullItemFacade.php.

79  {
80  $this->parent_identification = $parent;
81  }

◆ supportsRoleBasedVisibility()

ilMMNullItemFacade::supportsRoleBasedVisibility ( )

Implements ilMMItemFacadeInterface.

Definition at line 163 of file class.ilMMNullItemFacade.php.

163  : bool
164  {
165  return true;
166  }

Field Documentation

◆ $active_status

ilMMNullItemFacade::$active_status
private

Definition at line 22 of file class.ilMMNullItemFacade.php.

◆ $parent_identification

ilMMNullItemFacade::$parent_identification = ""
private

Definition at line 18 of file class.ilMMNullItemFacade.php.

◆ $top_item

ilMMNullItemFacade::$top_item = false
protected

Definition at line 26 of file class.ilMMNullItemFacade.php.

Referenced by isTopItem(), and setIsTopItm().


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