ILIAS  release_8 Revision v8.24
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 (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

ilMMCustomItemStorage $custom_item_storage
 
string $action = ''
 
string $type = ''
 
bool $top_item = false
 
- Protected Attributes inherited from ilMMAbstractItemFacade
bool $role_based_visibility = false
 
array $global_role_ids = []
 
TypeInformation $type_information
 
ilMMItemStorage $mm_item
 
isItem $filtered_item
 
isItem $raw_item
 
IdentificationInterface $identification
 
string $default_title = "-"
 

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 from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

40 {
42 $this->custom_item_storage = $this->getCustomStorage();
43 if ($this->custom_item_storage instanceof ilMMCustomItemStorage) {
44 if ($this->custom_item_storage->getType()) {
45 $this->type = $this->custom_item_storage->getType();
46 }
47 $this->role_based_visibility = $this->custom_item_storage->hasRoleBasedVisibility();
48 if ($this->custom_item_storage->hasRoleBasedVisibility()) {
49 $this->global_role_ids = $this->custom_item_storage->getGlobalRoleIDs();
50 }
51 }
52 }
IdentificationInterface $identification
Class ilMMCustomItemStorage.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilMMCustomItemFacade::delete ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

80 : void
81 {
82 if (!$this->isDeletable()) {
83 throw new LogicException("Non Custom items can't be deleted");
84 }
85
86 $cm = $this->getCustomStorage();
87 if ($cm instanceof ilMMCustomItemStorage) {
88 $cm->delete();
89 }
90 parent::delete();
91 }

References isDeletable().

+ Here is the call graph for this function:

◆ getProviderNameForPresentation()

ilMMCustomItemFacade::getProviderNameForPresentation ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

137 : string
138 {
139 return "Custom";
140 }

◆ getStatus()

ilMMCustomItemFacade::getStatus ( )
Returns
string

Reimplemented from ilMMAbstractItemFacade.

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

145 : string
146 {
147 return "";
148 }

◆ getType()

ilMMCustomItemFacade::getType ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

161 : string
162 {
163 return $this->type;
164 }

References $type.

Referenced by update().

+ Here is the caller graph for this function:

◆ isCustom()

ilMMCustomItemFacade::isCustom ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

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

113 : bool
114 {
115 return true;
116 }

Referenced by update().

+ Here is the caller graph for this function:

◆ isDeletable()

ilMMCustomItemFacade::isDeletable ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

Reimplemented in ilMMNullItemFacade.

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

129 : bool
130 {
131 return true;
132 }

Referenced by delete().

+ Here is the caller graph for this function:

◆ isEditable()

ilMMCustomItemFacade::isEditable ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

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

121 : bool
122 {
123 return true;
124 }

◆ isTopItem()

ilMMCustomItemFacade::isTopItem ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

177 : bool
178 {
179 if ($this->raw_item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem) {
180 return parent::isTopItem();
181 }
182
183 return $this->top_item;
184 }
Class ChatMainBarProvider \MainMenu\Provider.

References $top_item.

◆ setAction()

ilMMCustomItemFacade::setAction ( string  $action)

@inheritDoc

Implements ilMMItemFacadeInterface.

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

153 : void
154 {
155 $this->action = $action;
156 }

References $action.

◆ setIsTopItm()

ilMMCustomItemFacade::setIsTopItm ( bool  $top_item)

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

189 : void
190 {
191 $this->top_item = $top_item;
192 }

References $top_item.

◆ setType()

ilMMCustomItemFacade::setType ( string  $type)

@inheritDoc

Implements ilMMItemFacadeInterface.

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

169 : void
170 {
171 $this->type = $type;
172 }

References $type.

◆ supportsRoleBasedVisibility()

ilMMCustomItemFacade::supportsRoleBasedVisibility ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

105 : bool
106 {
107 return true;
108 }

◆ update()

ilMMCustomItemFacade::update ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

57 : void
58 {
59 if ($this->isCustom()) {
60 $mm = $this->getCustomStorage();
61 if ($mm instanceof ilMMCustomItemStorage) {
62 if ($this->default_title === '-') {
63 $this->default_title = ilMMItemTranslationStorage::getDefaultTranslation($this->identification());
64 }
65 $mm->setDefaultTitle($this->default_title);
66 $mm->setType($this->getType());
67 $mm->setRoleBasedVisibility($this->role_based_visibility);
68 if ($this->role_based_visibility) {
69 $mm->setGlobalRoleIDs($this->global_role_ids);
70 }
71 $mm->update();
72 }
73 }
74 parent::update();
75 }

References getType(), ilMMAbstractItemFacade\identification(), and isCustom().

+ Here is the call graph for this function:

Field Documentation

◆ $action

string ilMMCustomItemFacade::$action = ''
protected

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

Referenced by setAction().

◆ $custom_item_storage

ilMMCustomItemStorage ilMMCustomItemFacade::$custom_item_storage
protected

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

◆ $top_item

bool ilMMCustomItemFacade::$top_item = false
protected

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

Referenced by isTopItem(), and setIsTopItm().

◆ $type

string ilMMCustomItemFacade::$type = ''
protected

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

Referenced by getType(), and setType().


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