19declare(strict_types=1);
56 $this->db =
$DIC->database();
57 $this->main_collector =
$DIC->globalScreen()->collector()->mainmenu();
58 $this->main_collector->collectOnce();
59 $this->services =
$DIC->globalScreen();
61 foreach ($this->main_collector->getRawUnfilteredItems() as $top_item) {
68 $this->cache->flush();
77 return $this->main_collector->getSingleItemFromRaw($identification);
82 return $this->main_collector->getSingleItemFromFilter($identification);
87 return $this->services->identification()->fromSerializedIdentification($identification_string);
104 return ilMMItemStorage::where(
" parent_identification = '' OR parent_identification IS NULL ")->orderBy(
'position')->getArray();
112 $r = $this->db->query(
113 "SELECT sub_items.*, top_items.position AS parent_position
114FROM il_mm_items AS sub_items
115LEFT JOIN il_mm_items AS top_items ON top_items.identification = sub_items.parent_identification
116WHERE sub_items.parent_identification != '' ORDER BY top_items.position, parent_identification, sub_items.position ASC"
119 while (
$data = $this->db->fetchAssoc($r)) {
129 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
130 if (Lost::class === $item_facade->getType()) {
131 $item_facade->delete();
136 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
137 if (Lost::class === $item_facade->getType()) {
138 $item_facade->delete();
146 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
147 if (Lost::class === $item_facade->getType()) {
153 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
154 if (Lost::class === $item_facade->getType()) {
171 if ($identification->getClassName() === CustomMainBarProvider::class) {
175 return new ilMMItemFacade($identification, $this->main_collector);
185 $id = $this->services->identification()->fromSerializedIdentification($identification);
193 if ($parents ===
null) {
196 $identification = $this->services->identification()->fromSerializedIdentification($top_item_identification);
199 $parents[$top_item_identification] = $this->
getItemFacade($identification)
214 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
215 if ($information->isCreationPrevented()) {
218 if ($information->isChild()) {
219 if ($information->getType() === TopLinkItem::class) {
222 $types[$information->getType()] = $information;
235 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
236 if (!$new || $information->isTop()) {
237 $types[$information->getType()] = $information;
253 return $this->main_collector->getTypeHandlerForItem($item);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static where($where, $operator=null)
Class NullIdentification.
Class NullPluginIdentification.
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
Class CustomMainBarProvider.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(?string $component)
Class ilMMCustomItemFacade.
Class ilMMItemRepository.
getPossibleSubItemTypesWithInformation()
__construct()
ilMMItemRepository constructor.
resolveIdentificationFromString(string $identification_string)
updateItem(ilMMItemFacadeInterface $item_facade)
deleteItem(ilMMItemFacadeInterface $item_facade)
getPossibleParentsForFormAndTable()
getItemFacadeForIdentificationString(string $identification)
createItem(ilMMItemFacadeInterface $item_facade)
getItemFacade(IdentificationInterface $identification=null)
getSingleItem(IdentificationInterface $identification)
getPossibleTopItemTypesWithInformation(bool $new)
getTypeHandlerForType(string $type)
MainMenuMainCollector $main_collector
getSingleItemFromFilter(IdentificationInterface $identification)
static register(isItem $item)
Class ilMMNullItemFacade.
Interface IdentificationInterface.
Interface ilMMItemFacadeInterface.