19declare(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);
79 $this->map->filter(fn(
isItem $item):
bool => $this->item_information->isItemActive($item));
83 $item = $this->item_information->customTranslationForUser($item);
86 $item = $this->item_information->customPosition($item);
94 $parent_id = $this->item_information->getParent($item);
96 $parent = $this->map->getSingleItemFromFilter($parent_id);
98 if ($parent instanceof isGroup) {
99 $parent->addEntry($item);
100 $this->map->add($parent);
116 $this->map->filter(
function (
isItem $item):
bool {
117 if (!$item instanceof
isGroup) {
121 return $item->getEntries() !== [];
127 foreach ($this->map->getAllFromFilter() as $item) {
134 yield
from $this->map->getAllFromFilter();
139 yield
from $this->map->getAllFromRaw();
144 return $this->map->has();
149 if (!$this->hasItems()) {
152 foreach ($this->getItemsForUIRepresentation() as $item) {
153 return $item instanceof
isItem;
163 return $this->map->getSingleItemFromFilter($identification);
171 return $this->map->getSingleItemFromRaw($identification);
Class AbstractBaseCollector.
filterItemsByVisibilty(bool $async_only=false)
sortItemsForUIRepresentation()
getItemsForUIRepresentation()
cleanupItemsForUIRepresentation()
getSingleItemFromFilter(IdentificationInterface $identification)
getSingleItemFromRaw(IdentificationInterface $identification)
prepareItemsForUIRepresentation()
__construct(private readonly array $providers, private readonly ItemInformation $item_information)
Interface IdentificationInterface.