ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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 (protected 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
 
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 41 of file class.ilMMCustomItemFacade.php.

References ILIAS\GlobalScreen\Provider\__construct().

42  {
43  parent::__construct($identification, $collector);
44  $this->custom_item_storage = $this->getCustomStorage();
45  if ($this->custom_item_storage instanceof ilMMCustomItemStorage) {
46  if ($this->custom_item_storage->getType() !== '' && $this->custom_item_storage->getType() !== '0') {
47  $this->type = $this->custom_item_storage->getType();
48  }
49  $this->role_based_visibility = $this->custom_item_storage->hasRoleBasedVisibility();
50  if ($this->custom_item_storage->hasRoleBasedVisibility()) {
51  $this->global_role_ids = $this->custom_item_storage->getGlobalRoleIDs();
52  }
53  }
54  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilMMCustomItemFacade::delete ( )

Implements ilMMItemFacadeInterface.

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

References $id, and isDeletable().

84  : void
85  {
86  if (!$this->isDeletable()) {
87  throw new LogicException("Non Custom items can't be deleted");
88  }
89 
90  $cm = $this->getCustomStorage();
91  if ($cm instanceof ilMMCustomItemStorage) {
92  $cm->delete();
93  }
94  parent::delete();
95  }
+ Here is the call graph for this function:

◆ getProviderNameForPresentation()

ilMMCustomItemFacade::getProviderNameForPresentation ( )

Implements ilMMItemFacadeInterface.

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

143  : string
144  {
145  return "Custom";
146  }

◆ getStatus()

ilMMCustomItemFacade::getStatus ( )
Returns
string

Implements ilMMItemFacadeInterface.

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

152  : string
153  {
154  return "";
155  }

◆ getType()

ilMMCustomItemFacade::getType ( )

Implements ilMMItemFacadeInterface.

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

References $type.

Referenced by update().

169  : string
170  {
171  return $this->type;
172  }
+ Here is the caller graph for this function:

◆ isCustom()

ilMMCustomItemFacade::isCustom ( )

Implements ilMMItemFacadeInterface.

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

Referenced by update().

118  : bool
119  {
120  return true;
121  }
+ Here is the caller graph for this function:

◆ isDeletable()

ilMMCustomItemFacade::isDeletable ( )

Implements ilMMItemFacadeInterface.

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

Referenced by delete().

134  : bool
135  {
136  return true;
137  }
+ Here is the caller graph for this function:

◆ isEditable()

ilMMCustomItemFacade::isEditable ( )

Implements ilMMItemFacadeInterface.

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

126  : bool
127  {
128  return true;
129  }

◆ isTopItem()

ilMMCustomItemFacade::isTopItem ( )

Implements ilMMItemFacadeInterface.

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

References $top_item.

186  : bool
187  {
188  if ($this->raw_item instanceof isItem) {
189  return parent::isTopItem();
190  }
191 
192  return $this->top_item;
193  }

◆ setAction()

ilMMCustomItemFacade::setAction ( string  $action)

Implements ilMMItemFacadeInterface.

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

References $action.

160  : void
161  {
162  $this->action = $action;
163  }

◆ setIsTopItm()

ilMMCustomItemFacade::setIsTopItm ( bool  $top_item)

Implements ilMMItemFacadeInterface.

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

References $top_item.

199  : void
200  {
201  $this->top_item = $top_item;
202  }

◆ setType()

ilMMCustomItemFacade::setType ( string  $type)

Implements ilMMItemFacadeInterface.

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

References $type.

177  : void
178  {
179  $this->type = $type;
180  }

◆ supportsRoleBasedVisibility()

ilMMCustomItemFacade::supportsRoleBasedVisibility ( )

Implements ilMMItemFacadeInterface.

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

110  : bool
111  {
112  return true;
113  }

◆ update()

ilMMCustomItemFacade::update ( )

Implements ilMMItemFacadeInterface.

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

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

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

Field Documentation

◆ $action

string ilMMCustomItemFacade::$action = ''
protected

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

Referenced by setAction().

◆ $custom_item_storage

ilMMCustomItemStorage ilMMCustomItemFacade::$custom_item_storage
protected

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

◆ $top_item

bool ilMMCustomItemFacade::$top_item = false
protected

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

Referenced by isTopItem(), and setIsTopItm().

◆ $type

string ilMMCustomItemFacade::$type = ''
protected

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

Referenced by getType(), and setType().


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