ILIAS  release_8 Revision v8.23
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 ()
 
 isDeletable ()
 
 supportsRoleBasedVisibility ()
 
- Public Member Functions inherited from ilMMCustomItemFacade
 __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

bool $top_item = false
 
- Protected Attributes inherited from ilMMCustomItemFacade
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 = "-"
 

Private Attributes

string $parent_identification = ""
 
bool $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 25 of file class.ilMMNullItemFacade.php.

References ilMMAbstractItemFacade\$identification, ILIAS\GlobalScreen\Provider\__construct(), and ilMMItemFacadeInterface\identification().

26  {
28  parent::__construct($identification, $collector);
29  }
IdentificationInterface $identification
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilMMNullItemFacade::create ( )
Returns
void

Implements ilMMItemFacadeInterface.

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

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

77  : void
78  {
79  $s = new ilMMCustomItemStorage();
80  $s->setIdentifier(uniqid());
81  $s->setType($this->type);
82  $s->setTopItem($this->isTopItem());
83  $s->setAction($this->action);
84  $s->setDefaultTitle($this->default_title);
85  $s->create();
86 
87  $this->custom_item_storage = $s;
88 
89  global $DIC;
90  $provider = new CustomMainBarProvider($DIC);
91  $this->raw_item = $provider->getSingleCustomItem($s);
92  if ($this->parent_identification && $this->raw_item instanceof isChild) {
93  global $DIC;
94  $this->raw_item = $this->raw_item->withParent($DIC->globalScreen()->identification()->fromSerializedIdentification($this->parent_identification));
95  }
96 
97  $this->identification = $this->raw_item->getProviderIdentification();
98 
99  $this->mm_item = new ilMMItemStorage();
100  $this->mm_item->setPosition(9999999); // always the last on the top item
101  $this->mm_item->setIdentification($this->raw_item->getProviderIdentification()->serialize());
102  $this->mm_item->setParentIdentification($this->parent_identification);
103  $this->mm_item->setActive($this->active_status);
104  if ($this->raw_item instanceof isChild) {
105  $this->mm_item->setParentIdentification($this->raw_item->getParent()->serialize());
106  }
107 
108  parent::create();
109  }
global $DIC
Definition: feed.php:28
$provider
Definition: ltitoken.php:83
+ Here is the call graph for this function:

◆ getProviderNameForPresentation()

ilMMNullItemFacade::getProviderNameForPresentation ( )

Implements ilMMItemFacadeInterface.

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

References ilMMItemFacadeInterface\identification().

130  : string
131  {
132  return $this->identification->getProviderNameForPresentation();
133  }
+ Here is the call graph for this function:

◆ isAlwaysAvailable()

ilMMNullItemFacade::isAlwaysAvailable ( )

Implements ilMMItemFacadeInterface.

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

121  : bool
122  {
123  return false;
124  }

◆ isAvailable()

ilMMNullItemFacade::isAvailable ( )
Returns
bool

Implements ilMMItemFacadeInterface.

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

112  : bool
113  {
114  return false;
115  }

◆ isDeletable()

ilMMNullItemFacade::isDeletable ( )

Implements ilMMItemFacadeInterface.

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

139  : bool
140  {
141  return true;
142  }

◆ isEmpty()

ilMMNullItemFacade::isEmpty ( )

Implements ilMMItemFacadeInterface.

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

53  : bool
54  {
55  return true;
56  }

◆ isTopItem()

ilMMNullItemFacade::isTopItem ( )

Implements ilMMItemFacadeInterface.

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

References $top_item.

Referenced by create().

35  : bool
36  {
37  return $this->top_item;
38  }
+ Here is the caller graph for this function:

◆ setActiveStatus()

ilMMNullItemFacade::setActiveStatus ( bool  $status)

Implements ilMMItemFacadeInterface.

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

62  : void
63  {
64  $this->active_status = $status;
65  }

◆ setIsTopItm()

ilMMNullItemFacade::setIsTopItm ( bool  $top_item)

Implements ilMMItemFacadeInterface.

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

References $top_item.

44  : void
45  {
46  $this->top_item = $top_item;
47  }

◆ setParent()

ilMMNullItemFacade::setParent ( string  $parent)

Implements ilMMItemFacadeInterface.

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

71  : void
72  {
73  $this->parent_identification = $parent;
74  }

◆ supportsRoleBasedVisibility()

ilMMNullItemFacade::supportsRoleBasedVisibility ( )

Implements ilMMItemFacadeInterface.

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

148  : bool
149  {
150  return true;
151  }

Field Documentation

◆ $active_status

bool ilMMNullItemFacade::$active_status
private

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

◆ $parent_identification

string ilMMNullItemFacade::$parent_identification = ""
private

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

◆ $top_item

bool ilMMNullItemFacade::$top_item = false
protected

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

Referenced by isTopItem(), and setIsTopItm().


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