ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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...
 
 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 (protected IdentificationInterface $identification, Main $collector)
 ilMMAbstractItemFacade constructor. More...
 
 getId ()
 
 hasStorage ()
 
 supportsRoleBasedVisibility ()
 @inheritDoc More...
 
 canBeDeactivated ()
 
 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...
 
 canHaveChildren ()
 
 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)
 
 setActiveStatus (bool $status)
 
 supportsCustomIcon ()
 
 getIconID ()
 
 setIconID (string $icon_id)
 @inheritDoc More...
 
 update ()
 
 create ()
 
 getTitle ()
 
 delete ()
 @inheritDoc More...
 
 itemStorage ()
 
 getRawItem ()
 
 getFilteredItem ()
 
 identification ()
 
 getTypeForPresentation ()
 
 getProviderNameForPresentation ()
 
 getStatus ()
 
 isAvailable ()
 
 isActivated ()
 
 canBeDeactivated ()
 
 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 ()
 
 canHaveChildren ()
 
 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 ()
 
 getId ()
 
 getTitle ()
 

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
 
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 in ilMMNullItemFacade.

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

44 {
45 parent::__construct($identification, $collector);
46 $this->custom_item_storage = $this->getCustomStorage();
47 if ($this->custom_item_storage instanceof ilMMCustomItemStorage) {
48 if ($this->custom_item_storage->getType() !== '' && $this->custom_item_storage->getType() !== '0') {
49 $this->type = $this->custom_item_storage->getType();
50 }
51 $this->role_based_visibility = $this->custom_item_storage->hasRoleBasedVisibility();
52 if ($this->custom_item_storage->hasRoleBasedVisibility()) {
53 $this->global_role_ids = $this->custom_item_storage->getGlobalRoleIDs();
54 }
55 }
56 }
Class ilMMCustomItemStorage.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References 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 86 of file class.ilMMCustomItemFacade.php.

86 : void
87 {
88 if (!$this->isDeletable()) {
89 throw new LogicException("Non Custom items can't be deleted");
90 }
91
92 $cm = $this->getCustomStorage();
93 if ($cm instanceof ilMMCustomItemStorage) {
94 $cm->delete();
95 }
96 parent::delete();
97 }

References isDeletable().

+ Here is the call graph for this function:

◆ getProviderNameForPresentation()

ilMMCustomItemFacade::getProviderNameForPresentation ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

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

◆ getType()

ilMMCustomItemFacade::getType ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

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

References $type.

Referenced by update().

+ Here is the caller graph for this function:

◆ isCustom()

ilMMCustomItemFacade::isCustom ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

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

120 : bool
121 {
122 return true;
123 }

Referenced by update().

+ Here is the caller graph for this function:

◆ isDeletable()

ilMMCustomItemFacade::isDeletable ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

Reimplemented in ilMMNullItemFacade.

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

136 : bool
137 {
138 return true;
139 }

Referenced by delete().

+ Here is the caller graph for this function:

◆ isEditable()

ilMMCustomItemFacade::isEditable ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

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

128 : bool
129 {
130 return true;
131 }

◆ isTopItem()

ilMMCustomItemFacade::isTopItem ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

179 : bool
180 {
181 if ($this->raw_item instanceof isItem) {
182 return parent::isTopItem();
183 }
184
185 return $this->top_item;
186 }

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 192 of file class.ilMMCustomItemFacade.php.

192 : void
193 {
194 $this->top_item = $top_item;
195 }

References $top_item.

◆ setType()

ilMMCustomItemFacade::setType ( string  $type)

@inheritDoc

Implements ilMMItemFacadeInterface.

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

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

References $type.

◆ supportsRoleBasedVisibility()

ilMMCustomItemFacade::supportsRoleBasedVisibility ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

112 : bool
113 {
114 return true;
115 }

◆ update()

ilMMCustomItemFacade::update ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

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

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

+ Here is the call graph for this function:

Field Documentation

◆ $action

string ilMMCustomItemFacade::$action = ''
protected

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

Referenced by setAction().

◆ $custom_item_storage

ilMMCustomItemStorage ilMMCustomItemFacade::$custom_item_storage
protected

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

◆ $top_item

bool ilMMCustomItemFacade::$top_item = false
protected

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

Referenced by isTopItem(), and setIsTopItm().

◆ $type

string ilMMCustomItemFacade::$type = ''
protected

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

Referenced by getType(), and setType().


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