19declare(strict_types=1);
67 $this->raw_item = $collector->getSingleItemFromRaw($this->
identification);
68 $this->filtered_item = $collector->getSingleItemFromFilter($this->
identification);
69 $this->type_information = $collector->getTypeInformationCollection()->get($this->raw_item::class);
80 return ilMMItemStorage::find($this->
getId()) !==
null;
93 return !$this->raw_item->isAlwaysAvailable();
130 return $this->mm_item->getIdentification() ===
'';
140 return $this->identification;
154 if ($this->filtered_item instanceof
isParent || $this->filtered_item instanceof
isTopItem) {
155 return $this->filtered_item->getAmountOfChildren();
163 if ($this->filtered_item->isAvailable()) {
166 return $this->filtered_item->isAlwaysAvailable();
174 if ($this->mm_item->isActive() && $this->getRawItem()->isAvailable()) {
177 return $this->
getRawItem()->isAlwaysAvailable();
185 return $this->
getRawItem()->isAlwaysAvailable();
195 $default_translation = ilMMItemTranslationStorage::getDefaultTranslation($this->
identification);
196 if ($default_translation !==
"") {
197 return $default_translation;
199 if ($this->default_title ===
"-" && $this->raw_item instanceof
hasTitle) {
200 $this->default_title = $this->raw_item->getTitle();
213 $non_available_reason = $this->raw_item->getNonAvailableReason();
214 if (!$this->raw_item->isAvailable()) {
215 return $non_available_reason;
217 if ($this->raw_item->isAlwaysAvailable()) {
218 return $non_available_reason;
229 return $this->type_information->getTypeNameForPresentation();
235 $provider_name_for_presentation = $this->raw_item->getParent()->serialize();
237 $storage_parent = $this->mm_item->getParentIdentification();
238 if ($storage_parent !== $provider_name_for_presentation) {
239 return $storage_parent;
242 return $provider_name_for_presentation;
250 $known_core_types = [
255 RepositoryLink::class,
258 TopParentItem::class,
260 return !in_array($this->raw_item::class, $known_core_types,
true);
268 return $this->raw_item instanceof
isTopItem;
273 return $this->raw_item instanceof
isParent;
279 return $item instanceof
isChild
288 if ($this->raw_item instanceof
isChild) {
317 return $this->type_information->getType();
322 $this->mm_item->setParentIdentification($parent);
330 $this->mm_item->setPosition($position);
335 $this->mm_item->setActive($status);
340 return $this->raw_item instanceof
hasSymbol;
345 return $this->mm_item->getIconId();
353 $this->mm_item->setIconId($icon_id);
361 $this->mm_item->update();
367 $this->mm_item->create();
381 foreach ($ts as $translation) {
383 $translation->delete();
396 public function delete():
void
401 $mm = ilMMItemStorage::find($serialize);
static where($where, $operator=null)
Class NullIdentification.
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
Class ilMMAbstractItemFacade.
isInLostItem()
@inheritDoc
hasRoleBasedVisibility()
@inheritDoc
setPosition(int $position)
__construct(protected IdentificationInterface $identification, Main $collector)
ilMMAbstractItemFacade constructor.
setRoleBasedVisibility(bool $role_based_visibility)
@inheritDoc
getType()
FSX check if doublette @inheritDoc.
setParent(string $parent)
isInterchangeable()
@inheritDoc
setActiveStatus(bool $status)
TypeInformation $type_information
getGlobalRoleIDs()
@inheritDoc
setDefaultTitle(string $default_title)
setIconID(string $icon_id)
@inheritDoc
getParentIdentificationString()
bool $role_based_visibility
isAlwaysAvailable()
@inheritDoc
setIsTopItm(bool $top_item)
@inheritDoc
deleteAssociatedTranslations()
deletes all translations associated with the current identification.
supportsRoleBasedVisibility()
@inheritDoc
getProviderNameForPresentation()
setGlobalRoleIDs(array $global_role_ids)
@inheritDoc
static register(isItem $item)
Class ilMMItemTranslationStorage.
static storeDefaultTranslation(IdentificationInterface $identification, string $translation)
Interface IdentificationInterface.
Interface ilMMItemFacadeInterface.