3 declare(strict_types=1);
74 $this->map =
new Map($factory);
88 $this->type_information_collection->append($provider->provideTypeInformation());
89 $this->map->addMultiple(...$provider->getStaticTopItems());
90 $this->map->addMultiple(...$provider->getStaticSubItems());
97 $this->map->filter(
function (
isItem $item) use ($async_only):
bool {
107 foreach ($item->getChildren() as $child) {
108 if ($child->isAlwaysAvailable()) {
149 $this->map->walk(
function (
isItem $item) {
151 $parent = $this->map->getSingleItemFromFilter($this->information->getParent($item));
153 $parent->appendChild($item);
154 $item->overrideParent($parent->getProviderIdentification());
167 foreach ($item->getChildren() as $child) {
168 if (!$this->map->existsInFilter($child->getProviderIdentification())) {
169 $item->removeChild($child);
176 $this->map->walk(
static function (
isItem &
$i):
void {
177 if ($i instanceof
isParent && count($i->getChildren()) === 0) {
180 })->withVisibilityCallable(
static function () {
187 $this->map->filter(
static function (
isItem $i):
bool {
189 return count($i->getChildren()) > 0;
209 foreach ($this->map->getAllFromFilter() as $item) {
210 if ($item->isTop()) {
221 yield from $this->map->getAllFromFilter();
229 yield from $this->map->getAllFromRaw();
235 return $this->map->has();
244 return $item instanceof
isItem;
256 return $this->map->getSingleItemFromFilter($identification);
266 return $this->map->getSingleItemFromRaw($identification);
276 if ($type_information === null) {
280 return $type_information->getTypeHandler();
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
getTypeInformationForItem(isItem $item)
TypeInformationCollection $type_information_collection
sortItemsForUIRepresentation()
getTypeInformationCollection()
getItemsForUIRepresentation()
This will return all available isTopItem (and moved isInterchangeableItem), stacked based on the conf...
getSingleItemFromRaw(IdentificationInterface $identification)
Interface IdentificationInterface.
ItemInformation $information
Class AbstractBaseCollector.
filterItemsByVisibilty(bool $async_only=false)
getTypeHandlerForItem(isItem $item)
cleanupItemsForUIRepresentation()
prepareItemsForUIRepresentation()
setTypeInformation(TypeInformation $information)
Class MainMenuItemFactory This factory provides you all available types for MainMenu GlobalScreen Ite...
Class TypeInformationCollection.
getSingleItemFromFilter(IdentificationInterface $identification)
withAvailableCallable(callable $is_available)
Pass a callable which can decide whether your element is available in general, e.g.
__construct(array $providers, MainMenuItemFactory $factory, ItemInformation $information=null)
MainMenuMainCollector constructor.
Interface supportsAsynchronousLoading Types, which implement this interface, can load their content a...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface hasSymbol Methods for Entries with Symbols.