46 $this->db = $DIC->database();
47 $this->main_collector = $DIC->globalScreen()->collector()->mainmenu();
48 $this->main_collector->collectOnce();
49 $this->services = $DIC->globalScreen();
51 foreach ($this->main_collector->getRawItems() as $top_item) {
58 $this->cache->flush();
67 return $this->main_collector->getSingleItemFromRaw($identification);
72 return $this->main_collector->getSingleItemFromFilter($identification);
77 return $this->services->identification()->fromSerializedIdentification($identification_string);
94 return ilMMItemStorage::where(
" parent_identification = '' OR parent_identification IS NULL ")->orderBy(
'position')->getArray();
102 $r = $this->db->query(
103 "SELECT sub_items.*, top_items.position AS parent_position 104 FROM il_mm_items AS sub_items 105 LEFT JOIN il_mm_items AS top_items ON top_items.identification = sub_items.parent_identification 106 WHERE sub_items.parent_identification != '' ORDER BY top_items.position, parent_identification, sub_items.position ASC" 109 while (
$data = $this->db->fetchAssoc($r)) {
119 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
120 if (Lost::class === $item_facade->getType()) {
121 $item_facade->delete();
126 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
127 if (Lost::class === $item_facade->getType()) {
128 $item_facade->delete();
136 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
137 if (Lost::class === $item_facade->getType()) {
143 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
144 if (Lost::class === $item_facade->getType()) {
161 if ($identification->getClassName() === CustomMainBarProvider::class) {
165 return new ilMMItemFacade($identification, $this->main_collector);
175 $id = $this->services->
identification()->fromSerializedIdentification($identification);
183 if ($parents === null) {
186 $identification = $this->services->identification()->fromSerializedIdentification($top_item_identification);
189 $parents[$top_item_identification] = $this->
getItemFacade($identification)
204 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
205 if ($information->isCreationPrevented()) {
208 if ($information->isChild()) {
209 if ($information->getType() === TopLinkItem::class) {
212 $types[$information->getType()] = $information;
225 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
226 if ($information->isTop()) {
227 $types[$information->getType()] = $information;
243 return $this->main_collector->getTypeHandlerForItem($item);
resolveIdentificationFromString(string $identification_string)
getItemFacadeForIdentificationString(string $identification)
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.
getPossibleTopItemTypesWithInformation()
getSingleItemFromFilter(IdentificationInterface $identification)
Class ilMMCustomItemFacade.
createItem(ilMMItemFacadeInterface $item_facade)
getItemFacade(IdentificationInterface $identification=null)
Class NullPluginIdentification.
Interface ilMMItemFacadeInterface.
getSingleItem(IdentificationInterface $identification)