63 $this->map =
new Map($factory);
77 $this->type_information_collection->append($provider->provideTypeInformation());
78 $this->map->addMultiple(...$provider->getStaticTopItems());
79 $this->map->addMultiple(...$provider->getStaticSubItems());
86 $this->map->filter(
function (
isItem $item) use ($async_only) :
bool {
96 foreach ($item->getChildren() as $child) {
97 if ($child->isAlwaysAvailable()) {
134 $this->map->walk(
function (
isItem &$item) {
135 if ($item instanceof
isChild) {
136 $parent = $this->map->getSingleItemFromFilter($this->information->getParent($item));
138 $parent->appendChild($item);
140 $item->overrideParent($parent->getProviderIdentification());
154 foreach ($item->getChildren() as $child) {
155 if (!$this->map->existsInFilter($child->getProviderIdentification())) {
156 $item->removeChild($child);
163 $this->map->walk(
static function (
isItem &
$i) :
void {
164 if ($i instanceof
isParent && count($i->getChildren()) === 0) {
167 })->withVisibilityCallable(
static function () {
174 $this->map->filter(
static function (
isItem $i) :
bool {
176 return count($i->getChildren()) > 0;
197 foreach ($this->map->getAllFromFilter() as $item) {
198 if ($item->isTop()) {
209 yield from $this->map->getAllFromFilter();
217 return $this->map->has();
227 return $this->map->getSingleItemFromFilter($identification);
237 return $this->map->getSingleItemFromRaw($identification);
247 if ($type_information === null) {
251 return $type_information->getTypeHandler();
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
getTypeInformationForItem(isItem $item)
sortItemsForUIRepresentation()
getTypeInformationCollection()
getItemsForUIRepresentation()
This will return all available isTopItem (and moved isInterchangeableItem), stacked based on the conf...
getSingleItemFromRaw(IdentificationInterface $identification)
Interface IdentificationInterface.
Class AbstractBaseCollector.
filterItemsByVisibilty(bool $async_only=false)
getTypeHandlerForItem(isItem $item)
cleanupItemsForUIRepresentation()
prepareItemsForUIRepresentation()
setTypeInformation(TypeInformation $information)
Class MainMenuItemFactory.
Class TypeInformationCollection.
getSingleItemFromFilter(IdentificationInterface $identification)
__construct(array $providers, MainMenuItemFactory $factory, ItemInformation $information=null)
MainMenuMainCollector constructor.
Interface supportsAsynchronousLoading.
$type_information_collection
Interface hasSymbol Methods for Entries with Symbols.
getProviderIdentification()
withAvailableCallable(callable $is_avaiable)
Pass a callable which can decide wheter your element is available in general, e.g.