19 declare(strict_types=1);
43 private readonly array $providers,
46 $this->map =
new Map();
54 yield
from $this->providers;
60 $this->map->addMultiple(...$provider->getGroups());
61 $this->map->addMultiple(...$provider->getEntries());
62 $this->map->addMultiple(...$provider->getAdditionalTexts());
63 if (($permanent = $provider->getPermanentURI()) !==
null) {
64 $this->map->add($permanent);
77 $this->map->filter(fn(
isItem $item):
bool => $this->item_information->isItemActive($item));
81 $item = $this->item_information->customTranslationForUser($item);
84 $item = $this->item_information->customPosition($item);
92 $parent_id = $this->item_information->getParent($item);
94 $parent = $this->map->getSingleItemFromFilter($parent_id);
96 if ($parent instanceof
isGroup) {
97 $parent->addEntry($item);
98 $this->map->add($parent);
114 $this->map->filter(
function (
isItem $item):
bool {
115 if (!$item instanceof
isGroup) {
119 return $item->getEntries() !== [];
125 foreach ($this->map->getAllFromFilter() as $item) {
132 yield
from $this->map->getAllFromFilter();
137 yield
from $this->map->getAllFromRaw();
142 return $this->map->has();
151 return $item instanceof
isItem;
161 return $this->map->getSingleItemFromFilter($identification);
169 return $this->map->getSingleItemFromRaw($identification);
cleanupItemsForUIRepresentation()
getItemsForUIRepresentation()
Interface IdentificationInterface.
Class AbstractBaseCollector.
getSingleItemFromFilter(IdentificationInterface $identification)
__construct(private readonly array $providers, private readonly ItemInformation $item_information)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
sortItemsForUIRepresentation()
getSingleItemFromRaw(IdentificationInterface $identification)
prepareItemsForUIRepresentation()
filterItemsByVisibilty(bool $async_only=false)