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
104FROM il_mm_items AS sub_items
105LEFT JOIN il_mm_items AS top_items ON top_items.identification = sub_items.parent_identification
106WHERE 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);
static where($where, $operator=null)
An exception for terminatinating execution or to throw for unit testing.
Class NullIdentification.
Class NullPluginIdentification.
Class CustomMainBarProvider.
static getInstance($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)
getTypeHandlerForType(string $type)
getPossibleTopItemTypesWithInformation()
getSingleItemFromFilter(IdentificationInterface $identification)
static register(isItem $item)
Class ilMMNullItemFacade.
Interface IdentificationInterface.
Interface ilMMItemFacadeInterface.