ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMMCustomItemFacade Class Reference

Class ilMMCustomItemFacade. More...

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

Public Member Functions

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

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 
)

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

References ILIAS\GlobalScreen\Provider\__construct().

40  {
41  parent::__construct($identification, $collector);
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  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilMMCustomItemFacade::delete ( )

Implements ilMMItemFacadeInterface.

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

References $id, and isDeletable().

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  }
+ Here is the call graph for this function:

◆ getProviderNameForPresentation()

ilMMCustomItemFacade::getProviderNameForPresentation ( )

Implements ilMMItemFacadeInterface.

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

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

◆ getStatus()

ilMMCustomItemFacade::getStatus ( )
Returns
string

Implements ilMMItemFacadeInterface.

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

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

◆ getType()

ilMMCustomItemFacade::getType ( )

Implements ilMMItemFacadeInterface.

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

References $type.

Referenced by update().

161  : string
162  {
163  return $this->type;
164  }
+ Here is the caller graph for this function:

◆ isCustom()

ilMMCustomItemFacade::isCustom ( )

Implements ilMMItemFacadeInterface.

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

Referenced by update().

113  : bool
114  {
115  return true;
116  }
+ Here is the caller graph for this function:

◆ isDeletable()

ilMMCustomItemFacade::isDeletable ( )

Implements ilMMItemFacadeInterface.

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

Referenced by delete().

129  : bool
130  {
131  return true;
132  }
+ Here is the caller graph for this function:

◆ isEditable()

ilMMCustomItemFacade::isEditable ( )

Implements ilMMItemFacadeInterface.

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

121  : bool
122  {
123  return true;
124  }

◆ isTopItem()

ilMMCustomItemFacade::isTopItem ( )

Implements ilMMItemFacadeInterface.

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

References $top_item.

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 .

◆ setAction()

ilMMCustomItemFacade::setAction ( string  $action)

Implements ilMMItemFacadeInterface.

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

References $action.

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

◆ setIsTopItm()

ilMMCustomItemFacade::setIsTopItm ( bool  $top_item)

Implements ilMMItemFacadeInterface.

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

References $top_item.

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

◆ setType()

ilMMCustomItemFacade::setType ( string  $type)

Implements ilMMItemFacadeInterface.

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

References $type.

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

◆ supportsRoleBasedVisibility()

ilMMCustomItemFacade::supportsRoleBasedVisibility ( )

Implements ilMMItemFacadeInterface.

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

105  : bool
106  {
107  return true;
108  }

◆ update()

ilMMCustomItemFacade::update ( )

Implements ilMMItemFacadeInterface.

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

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

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