19 declare(strict_types=1);
66 $this->map =
new Map($factory);
74 yield
from $this->providers;
80 $this->type_information_collection->append($provider->provideTypeInformation());
81 $this->map->addMultiple(...$provider->getStaticTopItems());
82 $this->map->addMultiple(...$provider->getStaticSubItems());
89 $this->map->filter(
function (
isItem $item) use ($async_only):
bool {
99 foreach ($item->getChildren() as $child) {
100 if ($child->isAlwaysAvailable()) {
117 if ($this->default_topics) {
152 $parent = $this->map->getSingleItemFromFilter($this->information->getParent($item));
154 $parent->appendChild($item);
155 $item->overrideParent($parent->getProviderIdentification());
168 foreach ($item->getChildren() as $child) {
169 if (!$this->map->existsInFilter($child->getProviderIdentification())) {
170 $item->removeChild($child);
177 $this->map->walk(
static function (
isItem &$i):
void {
178 if ($i instanceof
isParent && $i->getChildren() === []) {
179 $i = $i->
withAvailableCallable(
static fn():
bool =>
false)->withVisibilityCallable(
static fn():
bool =>
false);
184 $this->map->filter(
static function (
isItem $i):
bool {
186 return $i->getChildren() !== [];
206 foreach ($this->map->getAllFromFilter() as $item) {
207 if ($item->isTop()) {
218 yield
from $this->map->getAllFromFilter();
226 yield
from $this->map->getAllFromRaw();
232 return $this->map->has();
241 return $item instanceof
isItem;
253 return $this->map->getSingleItemFromFilter($identification);
263 return $this->map->getSingleItemFromRaw($identification);
273 if ($type_information === null) {
277 return $type_information->getTypeHandler();
285 return $this->information;
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
getTypeInformationForItem(isItem $item)
sortItemsForUIRepresentation()
This is just a class that marks a string as a help topic.
getTypeInformationCollection()
getItemsForUIRepresentation()
This will return all available isTopItem (and moved isInterchangeableItem), stacked based on the conf...
getSingleItemFromRaw(IdentificationInterface $identification)
Interface IdentificationInterface.
readonly TypeInformationCollection $type_information_collection
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.
Interface supportsAsynchronousLoading Types, which implement this interface, can load their content a...
__construct(protected array $providers, MainMenuItemFactory $factory, private readonly ?ItemInformation $information=null)
getProviderIdentification()