19 declare(strict_types=1);
64 $this->db = $DIC->database();
65 $this->main_collector = $DIC->globalScreen()->collector()->mainmenu();
66 $this->main_collector->collectOnce();
67 $this->services = $DIC->globalScreen();
69 foreach ($this->main_collector->getRawUnfilteredItems() as $top_item) {
76 $this->cache->flush();
85 return $this->main_collector->getSingleItemFromRaw($identification);
90 return $this->main_collector->getSingleItemFromFilter($identification);
95 return $this->services->identification()->fromSerializedIdentification($identification_string);
112 return ilMMItemStorage::where(
" parent_identification = '' OR parent_identification IS NULL ")->orderBy(
'position')->getArray();
120 $r = $this->db->query(
121 "SELECT sub_items.*, top_items.position AS parent_position 122 FROM il_mm_items AS sub_items 123 LEFT JOIN il_mm_items AS top_items ON top_items.identification = sub_items.parent_identification 124 WHERE sub_items.parent_identification != '' ORDER BY top_items.position, parent_identification, sub_items.position ASC" 127 while (
$data = $this->db->fetchAssoc($r)) {
137 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
138 if (Lost::class === $item_facade->getType()) {
139 $item_facade->delete();
144 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
145 if (Lost::class === $item_facade->getType()) {
146 $item_facade->delete();
154 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
155 if (Lost::class === $item_facade->getType()) {
161 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
162 if (Lost::class === $item_facade->getType()) {
179 if ($identification->getClassName() === CustomMainBarProvider::class) {
183 return new ilMMItemFacade($identification, $this->main_collector);
193 $id = $this->services->
identification()->fromSerializedIdentification($identification);
201 if ($parents === null) {
204 $identification = $this->services->identification()->fromSerializedIdentification($top_item_identification);
207 $parents[$top_item_identification] = $this->
getItemFacade($identification)
222 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
223 if ($information->isCreationPrevented()) {
226 if ($information->isChild()) {
227 if ($information->getType() === TopLinkItem::class) {
230 $types[$information->getType()] = $information;
243 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
244 if (!$new || $information->isTop()) {
245 $types[$information->getType()] = $information;
261 return $this->main_collector->getTypeHandlerForItem($item);
resolveIdentificationFromString(string $identification_string)
getItemFacadeForIdentificationString(string $identification)
getPossibleTopItemTypesWithInformation(bool $new)
deleteItem(ilMMItemFacadeInterface $item_facade)
Class ilMMNullItemFacade.
Interface IdentificationInterface.
static getInstance($component)
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.
createItem(ilMMItemFacadeInterface $item_facade)
getItemFacade(IdentificationInterface $identification=null)
Class NullPluginIdentification.
Interface ilMMItemFacadeInterface.
getSingleItem(IdentificationInterface $identification)