ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMMNullItemFacade Class Reference

Class ilMMNullItemFacade. More...

+ Inheritance diagram for ilMMNullItemFacade:
+ Collaboration diagram for ilMMNullItemFacade:

Public Member Functions

 __construct (IdentificationInterface $identification, Main $collector)
 
 isTopItem ()
 
 setIsTopItm (bool $top_item)
 
 isEmpty ()
 
 setActiveStatus (bool $status)
 
 setParent (string $parent)
 
 create ()
 
 isAvailable ()
 
 isAlwaysAvailable ()
 
 getProviderNameForPresentation ()
 
- Public Member Functions inherited from ilMMCustomItemFacade
 __construct (IdentificationInterface $identification, Main $collector)
 
 update ()
 
 delete ()
 
 isCustom ()
 
 isEditable ()
 
 isDeletable ()
 
 getProviderNameForPresentation ()
 
 getStatus ()
 
 setAction (string $action)
 
 getType ()
 
 setType (string $type)
 
 isTopItem ()
 
 setIsTopItm (bool $top_item)
 
- 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 ()
 
 isAlwaysAvailable ()
 
 getProviderNameForPresentation ()
 
 getDefaultTitle ()
 
 setDefaultTitle (string $default_title)
 
 getStatus ()
 
 getTypeForPresentation ()
 
 getParentIdentificationString ()
 
 isCustomType ()
 
 isTopItem ()
 
 isInLostItem ()
 
 setIsTopItm (bool $top_item)
 
 getType ()
 FSX check if doublette. More...
 
 setParent (string $parent)
 
 setPosition (int $position)
 
Parameters
int$position
More...
 
 setActiveStatus (bool $status)
 
 update ()
 
 create ()
 
 delete ()
 

Protected Attributes

 $top_item = false
 
- Protected Attributes inherited from ilMMCustomItemFacade
 $custom_item_storage
 
 $action = ''
 
 $type = ''
 
 $top_item = false
 
- Protected Attributes inherited from ilMMAbstractItemFacade
 $type_information
 
 $mm_item
 
 $gs_item
 
 $identification
 
 $default_title = "-"
 

Private Attributes

 $parent_identification = ""
 
 $active_status
 

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

ilMMNullItemFacade::__construct ( IdentificationInterface  $identification,
Main  $collector 
)

Definition at line 31 of file class.ilMMNullItemFacade.php.

References ilMMAbstractItemFacade\$identification, and ilMMItemFacadeInterface\identification().

32  {
34  parent::__construct($identification, $collector);
35  }
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilMMNullItemFacade::create ( )
Returns
void

Implements ilMMItemFacadeInterface.

Definition at line 83 of file class.ilMMNullItemFacade.php.

References $DIC, PHPMailer\PHPMailer\$provider, $s, ilMMItemFacadeInterface\identification(), and isTopItem().

84  {
85  $s = new ilMMCustomItemStorage();
86  $s->setIdentifier(uniqid());
87  $s->setType($this->type);
88  $s->setTopItem($this->isTopItem());
89  $s->setAction($this->action);
90  $s->setDefaultTitle($this->default_title);
91  $s->create();
92 
93  $this->custom_item_storage = $s;
94 
95  global $DIC;
96  $provider = new ilMMCustomProvider($DIC);
97  $this->gs_item = $provider->getSingleCustomItem($s);
98  if ($this->parent_identification && $this->gs_item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild) {
99  global $DIC;
100  $this->gs_item = $this->gs_item->withParent($DIC->globalScreen()->identification()->fromSerializedIdentification($this->parent_identification));
101  }
102 
103  $this->identification = $this->gs_item->getProviderIdentification();
104 
105  $this->mm_item = new ilMMItemStorage();
106  $this->mm_item->setPosition(9999999); // always the last on the top item
107  $this->mm_item->setIdentification($this->gs_item->getProviderIdentification()->serialize());
108  $this->mm_item->setParentIdentification($this->parent_identification);
109  $this->mm_item->setActive($this->active_status);
110  if ($this->gs_item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild) {
111  $this->mm_item->setParentIdentification($this->gs_item->getParent()->serialize());
112  }
113 
114  parent::create();
115  }
Class ilMMCustomItemStorage.
Class ilMMCustomProvider.
global $DIC
Definition: saml.php:7
Class BaseForm.
$s
Definition: pwgen.php:45
Class ilMMItemStorage.
+ Here is the call graph for this function:

◆ getProviderNameForPresentation()

ilMMNullItemFacade::getProviderNameForPresentation ( )

Implements ilMMItemFacadeInterface.

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

References ilMMItemFacadeInterface\identification().

136  : string
137  {
138  return $this->identification->getProviderNameForPresentation();
139  }
+ Here is the call graph for this function:

◆ isAlwaysAvailable()

ilMMNullItemFacade::isAlwaysAvailable ( )

Implements ilMMItemFacadeInterface.

Definition at line 127 of file class.ilMMNullItemFacade.php.

127  : bool
128  {
129  return false;
130  }

◆ isAvailable()

ilMMNullItemFacade::isAvailable ( )
Returns
bool

Implements ilMMItemFacadeInterface.

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

118  : bool
119  {
120  return false;
121  }

◆ isEmpty()

ilMMNullItemFacade::isEmpty ( )

Implements ilMMItemFacadeInterface.

Definition at line 59 of file class.ilMMNullItemFacade.php.

59  : bool
60  {
61  return true;
62  }

◆ isTopItem()

ilMMNullItemFacade::isTopItem ( )

Implements ilMMItemFacadeInterface.

Definition at line 41 of file class.ilMMNullItemFacade.php.

References $top_item.

Referenced by create().

41  : bool
42  {
43  return $this->top_item;
44  }
+ Here is the caller graph for this function:

◆ setActiveStatus()

ilMMNullItemFacade::setActiveStatus ( bool  $status)

Implements ilMMItemFacadeInterface.

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

69  {
70  $this->active_status = $status;
71  }

◆ setIsTopItm()

ilMMNullItemFacade::setIsTopItm ( bool  $top_item)

Implements ilMMItemFacadeInterface.

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

References $top_item.

51  {
52  $this->top_item = $top_item;
53  }

◆ setParent()

ilMMNullItemFacade::setParent ( string  $parent)

Implements ilMMItemFacadeInterface.

Definition at line 77 of file class.ilMMNullItemFacade.php.

78  {
79  $this->parent_identification = $parent;
80  }

Field Documentation

◆ $active_status

ilMMNullItemFacade::$active_status
private

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

◆ $parent_identification

ilMMNullItemFacade::$parent_identification = ""
private

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

◆ $top_item

ilMMNullItemFacade::$top_item = false
protected

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

Referenced by isTopItem(), and setIsTopItm().


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