19 declare(strict_types=1);
47 private \ILIAS\Cache\Container\Container
$cache;
56 $this->cache = $DIC->globalCache()->get($this);
57 $this->db = $DIC->database();
58 $this->main_collector = $DIC->globalScreen()->collector()->mainmenu();
59 $this->main_collector->collectOnce();
60 $this->services = $DIC->globalScreen();
62 foreach ($this->main_collector->getRawUnfilteredItems() as $top_item) {
80 $this->cache->flush();
89 return $this->main_collector->getSingleItemFromRaw($identification);
94 return $this->main_collector->getSingleItemFromFilter($identification);
99 return $this->services->identification()->fromSerializedIdentification($identification_string);
116 return ilMMItemStorage::where(
" parent_identification = '' OR parent_identification IS NULL ")->orderBy(
'position')->getArray();
124 $r = $this->db->query(
125 "SELECT sub_items.*, top_items.position AS parent_position 126 FROM il_mm_items AS sub_items 127 LEFT JOIN il_mm_items AS top_items ON top_items.identification = sub_items.parent_identification 128 WHERE sub_items.parent_identification != '' ORDER BY top_items.position, parent_identification, sub_items.position ASC" 131 while (
$data = $this->db->fetchAssoc(
$r)) {
141 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
142 if (Lost::class === $item_facade->getType()) {
143 $item_facade->delete();
148 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
149 if (Lost::class === $item_facade->getType()) {
150 $item_facade->delete();
158 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
159 if (Lost::class === $item_facade->getType()) {
165 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
166 if (Lost::class === $item_facade->getType()) {
183 if ($identification->getClassName() === CustomMainBarProvider::class) {
187 return new ilMMItemFacade($identification, $this->main_collector);
197 $id = $this->services->identification()->fromSerializedIdentification($identification);
205 if ($parents === null) {
208 $identification = $this->services->identification()->fromSerializedIdentification($top_item_identification);
211 $parents[$top_item_identification] = $this->
getItemFacade($identification)
226 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
227 if ($information->isCreationPrevented()) {
230 if ($information->isChild()) {
231 if ($information->getType() === TopLinkItem::class) {
234 $types[$information->getType()] = $information;
247 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
248 if (!$new || $information->isTop()) {
249 $types[$information->getType()] = $information;
265 return $this->main_collector->getTypeHandlerForItem($item);
resolveIdentificationFromString(string $identification_string)
getItemFacadeForIdentificationString(string $identification)
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
getPossibleTopItemTypesWithInformation(bool $new)
deleteItem(ilMMItemFacadeInterface $item_facade)
Class ilMMNullItemFacade.
Interface IdentificationInterface.
getPossibleParentsForFormAndTable()
Class NullIdentification.
getTypeHandlerForType(string $type)
static where($where, $operator=null)
Class ilMMItemRepository.
updateItem(ilMMItemFacadeInterface $item_facade)
static register(isItem $item)
getPossibleSubItemTypesWithInformation()
__construct()
ilMMItemRepository constructor.
getSingleItemFromFilter(IdentificationInterface $identification)
Class ilMMCustomItemFacade.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
createItem(ilMMItemFacadeInterface $item_facade)
getItemFacade(IdentificationInterface $identification=null)
ILIAS Cache Container Container $cache
Class NullPluginIdentification.
Interface ilMMItemFacadeInterface.
MainMenuMainCollector $main_collector
getSingleItem(IdentificationInterface $identification)