ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 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 ()
 
 isEmpty ()
 
 itemStorage ()
 
 identification ()
 
 item ()
 
 getAmountOfChildren ()
 
 isAvailable ()
 
 isActivated ()
 @inheritDoc More...
 
 isAlwaysAvailable ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getDefaultTitle ()
 
 setDefaultTitle (string $default_title)
 
 getStatus ()
 
 getTypeForPresentation ()
 
 getParentIdentificationString ()
 
 isCustomType ()
 
 isTopItem ()
 @inheritDoc More...
 
 isInLostItem ()
 @inheritDoc More...
 
 setIsTopItm (bool $top_item)
 @inheritDoc More...
 
 getType ()
 FSX check if doublette. More...
 
 setParent (string $parent)
 
 setPosition (int $position)
 
Parameters
int$position
More...
 
 setActiveStatus (bool $status)
 
 update ()
 
 create ()
 
 delete ()
 @inheritDoc More...
 
 itemStorage ()
 
 item ()
 
 identification ()
 
 getTypeForPresentation ()
 
 getProviderNameForPresentation ()
 
 getStatus ()
 
 isAvailable ()
 
 isActivated ()
 
 isEditable ()
 
 isDeletable ()
 
 isAlwaysAvailable ()
 
 getDefaultTitle ()
 
 getId ()
 
 getAmountOfChildren ()
 
 hasStorage ()
 
 isEmpty ()
 
 isCustom ()
 
 isCustomType ()
 
 getParentIdentificationString ()
 
 getType ()
 
 isTopItem ()
 
 isInLostItem ()
 
 setAction (string $action)
 
 setActiveStatus (bool $status)
 
 setDefaultTitle (string $default_title)
 
 setPosition (int $position)
 
 setParent (string $parent)
 
 setType (string $type)
 
 setIsTopItm (bool $top_item)
 
 update ()
 
 create ()
 
 delete ()
 

Protected Attributes

 $custom_item_storage
 
 $action = ''
 
 $type = ''
 
 $top_item = false
 
- Protected Attributes inherited from ilMMAbstractItemFacade
 $type_information
 
 $mm_item
 
 $gs_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 35 of file class.ilMMCustomItemFacade.php.

36 {
37 parent::__construct($identification, $collector);
38 $this->custom_item_storage = $this->getCustomStorage();
39 if ($this->custom_item_storage instanceof ilMMCustomItemStorage) {
40 if ($this->custom_item_storage->getType()) {
41 $this->type = $this->custom_item_storage->getType();
42 }
43 }
44 }
Class ilMMCustomItemStorage.

References ilMMAbstractItemFacade\$identification, and getCustomStorage().

+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilMMCustomItemFacade::delete ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

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

References getCustomStorage(), and isDeletable().

+ Here is the call graph for this function:

◆ getCustomStorage()

ilMMCustomItemFacade::getCustomStorage ( )
private
Returns
ilMMCustomItemStorage|null

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

86 {
87 $id = $this->gs_item->getProviderIdentification()->getInternalIdentifier();
89
90 return $mm;
91 }
static find($primary_key, array $add_constructor_args=array())
@inheritDoc
if(!array_key_exists('StateId', $_REQUEST)) $id

References $id, and 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 124 of file class.ilMMCustomItemFacade.php.

124 : string
125 {
126 return "Custom";
127 }

◆ getStatus()

ilMMCustomItemFacade::getStatus ( )
Returns
string

Reimplemented from ilMMAbstractItemFacade.

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

133 : string
134 {
135 return "";
136 }

◆ getType()

ilMMCustomItemFacade::getType ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

151 : string
152 {
153 return $this->type;
154 }

References $type.

Referenced by update().

+ Here is the caller graph for this function:

◆ isCustom()

ilMMCustomItemFacade::isCustom ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

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

97 : bool
98 {
99 return true;
100 }

Referenced by update().

+ Here is the caller graph for this function:

◆ isDeletable()

ilMMCustomItemFacade::isDeletable ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

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

115 : bool
116 {
117 return true;
118 }

Referenced by delete().

+ Here is the caller graph for this function:

◆ isEditable()

ilMMCustomItemFacade::isEditable ( )

@inheritDoc

Implements ilMMItemFacadeInterface.

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

106 : bool
107 {
108 return true;
109 }

◆ isTopItem()

ilMMCustomItemFacade::isTopItem ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

169 : bool
170 {
171 if ($this->gs_item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem) {
172 return parent::isTopItem();
173 }
174
175 return $this->top_item;
176 }
Class BaseForm.

References $top_item.

◆ setAction()

ilMMCustomItemFacade::setAction ( string  $action)

@inheritDoc

Implements ilMMItemFacadeInterface.

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

143 {
144 $this->action = $action;
145 }

References $action.

◆ setIsTopItm()

ilMMCustomItemFacade::setIsTopItm ( bool  $top_item)

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

Reimplemented in ilMMNullItemFacade.

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

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

References $top_item.

◆ setType()

ilMMCustomItemFacade::setType ( string  $type)

@inheritDoc

Implements ilMMItemFacadeInterface.

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

161 {
162 $this->type = $type;
163 }

References $type.

◆ update()

ilMMCustomItemFacade::update ( )

@inheritDoc

Reimplemented from ilMMAbstractItemFacade.

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

51 {
52 if ($this->isCustom()) {
53 $mm = $this->getCustomStorage();
54 if ($mm instanceof ilMMCustomItemStorage) {
55 $default_title = ilMMItemTranslationStorage::getDefaultTranslation($this->identification());
56 $mm->setDefaultTitle($default_title);
57 $mm->setType($this->getType());
58 $mm->update();
59 }
60 }
62 }
update($pash, $contents, Config $config)

References ilMMAbstractItemFacade\$default_title, getCustomStorage(), getType(), ilMMAbstractItemFacade\identification(), isCustom(), and League\Flysystem\Adapter\Polyfill\update().

+ Here is the call graph for this function:

Field Documentation

◆ $action

ilMMCustomItemFacade::$action = ''
protected

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

Referenced by setAction().

◆ $custom_item_storage

ilMMCustomItemFacade::$custom_item_storage
protected

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

◆ $top_item

ilMMCustomItemFacade::$top_item = false
protected

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

Referenced by isTopItem(), and setIsTopItm().

◆ $type

ilMMCustomItemFacade::$type = ''
protected

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

Referenced by getType(), and setType().


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