ILIAS  release_7 Revision v7.30-3-g800a261c036
ilMMCustomItemFacade Class Reference

Class ilMMCustomItemFacade. More...

+ Inheritance diagram for ilMMCustomItemFacade:
+ Collaboration diagram for ilMMCustomItemFacade:

Public Member Functions

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

Protected Attributes

 $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 Member Functions

 getCustomStorage ()
 

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()

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

@inheritDoc

Reimplemented in ilMMNullItemFacade.

Definition at line 33 of file class.ilMMCustomItemFacade.php.

34 {
36 $this->custom_item_storage = $this->getCustomStorage();
37 if ($this->custom_item_storage instanceof ilMMCustomItemStorage) {
38 if ($this->custom_item_storage->getType()) {
39 $this->type = $this->custom_item_storage->getType();
40 }
41 $this->role_based_visibility = $this->custom_item_storage->hasRoleBasedVisibility();
42 if ($this->custom_item_storage->hasRoleBasedVisibility()) {
43 $this->global_role_ids = $this->custom_item_storage->getGlobalRoleIDs();
44 }
45 }
46 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilMMCustomItemFacade::delete ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

Definition at line 72 of file class.ilMMCustomItemFacade.php.

73 {
74 if (!$this->isDeletable()) {
75 throw new LogicException("Non Custom items can't be deleted");
76 }
77
78 $cm = $this->getCustomStorage();
79 if ($cm instanceof ilMMCustomItemStorage) {
80 $cm->delete();
81 }
82 parent::delete();
83 }

References getCustomStorage(), and isDeletable().

+ Here is the call graph for this function:

◆ getCustomStorage()

ilMMCustomItemFacade::getCustomStorage ( )
private
Returns
ilMMCustomItemStorage|null

Definition at line 88 of file class.ilMMCustomItemFacade.php.

89 {
90 $id = $this->raw_item->getProviderIdentification()->getInternalIdentifier();
92
93 return $mm;
94 }
static find($primary_key, array $add_constructor_args=array())
@inheritDoc

References CachedActiveRecord\find().

Referenced by __construct(), delete(), and update().

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

◆ getProviderNameForPresentation()

ilMMCustomItemFacade::getProviderNameForPresentation ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

131 : string
132 {
133 return "Custom";
134 }

◆ getStatus()

ilMMCustomItemFacade::getStatus ( )
Returns
string

Reimplemented from ilMMAbstractItemFacade.

Definition at line 139 of file class.ilMMCustomItemFacade.php.

139 : string
140 {
141 return "";
142 }

◆ getType()

ilMMCustomItemFacade::getType ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

155 : string
156 {
157 return $this->type;
158 }

References $type.

Referenced by update().

+ Here is the caller graph for this function:

◆ isCustom()

ilMMCustomItemFacade::isCustom ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

Definition at line 107 of file class.ilMMCustomItemFacade.php.

107 : bool
108 {
109 return true;
110 }

Referenced by update().

+ Here is the caller graph for this function:

◆ isDeletable()

ilMMCustomItemFacade::isDeletable ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

Reimplemented in ilMMNullItemFacade.

Definition at line 123 of file class.ilMMCustomItemFacade.php.

123 : bool
124 {
125 return true;
126 }

Referenced by delete().

+ Here is the caller graph for this function:

◆ isEditable()

ilMMCustomItemFacade::isEditable ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

Definition at line 115 of file class.ilMMCustomItemFacade.php.

115 : bool
116 {
117 return true;
118 }

◆ isTopItem()

ilMMCustomItemFacade::isTopItem ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

Definition at line 171 of file class.ilMMCustomItemFacade.php.

171 : bool
172 {
173 if ($this->raw_item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem) {
174 return parent::isTopItem();
175 }
176
177 return $this->top_item;
178 }
Class ChatMainBarProvider \MainMenu\Provider.

References $top_item.

◆ setAction()

ilMMCustomItemFacade::setAction ( string  $action)

@inheritDoc

Implements ilMMItemFacadeInterface.

Definition at line 147 of file class.ilMMCustomItemFacade.php.

148 {
149 $this->action = $action;
150 }

References $action.

◆ setIsTopItm()

ilMMCustomItemFacade::setIsTopItm ( bool  $top_item)

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

Definition at line 183 of file class.ilMMCustomItemFacade.php.

184 {
185 $this->top_item = $top_item;
186 }

References $top_item.

◆ setType()

ilMMCustomItemFacade::setType ( string  $type)

@inheritDoc

Implements ilMMItemFacadeInterface.

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

164 {
165 $this->type = $type;
166 }

References $type.

◆ supportsRoleBasedVisibility()

ilMMCustomItemFacade::supportsRoleBasedVisibility ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

Definition at line 99 of file class.ilMMCustomItemFacade.php.

99 : bool
100 {
101 return true;
102 }

◆ update()

ilMMCustomItemFacade::update ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

52 {
53 if ($this->isCustom()) {
54 $mm = $this->getCustomStorage();
55 if ($mm instanceof ilMMCustomItemStorage) {
56 $default_title = ilMMItemTranslationStorage::getDefaultTranslation($this->identification());
57 $mm->setDefaultTitle($default_title);
58 $mm->setType($this->getType());
59 $mm->setRoleBasedVisibility($this->role_based_visibility);
60 if ($this->role_based_visibility) {
61 $mm->setGlobalRoleIDs($this->global_role_ids);
62 }
63 $mm->update();
64 }
65 }
66 parent::update();
67 }

References ilMMAbstractItemFacade\$default_title, getCustomStorage(), getType(), ilMMAbstractItemFacade\identification(), and isCustom().

+ Here is the call graph for this function:

Field Documentation

◆ $action

ilMMCustomItemFacade::$action = ''
protected

Definition at line 20 of file class.ilMMCustomItemFacade.php.

Referenced by setAction().

◆ $custom_item_storage

ilMMCustomItemFacade::$custom_item_storage
protected

Definition at line 16 of file class.ilMMCustomItemFacade.php.

◆ $top_item

ilMMCustomItemFacade::$top_item = false
protected

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

Referenced by isTopItem(), and setIsTopItm().

◆ $type

ilMMCustomItemFacade::$type = ''
protected

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

Referenced by getType(), and setType().


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