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()) {
105 return $item->isVisible();
118 $item = $this->getTypeHandlerForItem($item)->enrichItem($item);
121 $item = $this->getItemInformation()->customTranslationForUser($item);
125 $item = $this->getItemInformation()->customSymbol($item);
128 $item = $this->getItemInformation()->customPosition($item);
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) {
165 $i = $i->withAvailableCallable(static function () {
167 })->withVisibilityCallable(
static function () {
174 $this->map->filter(
static function (isItem
$i) :
bool {
175 if (
$i instanceof isParent) {
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);
246 $type_information = $this->getTypeInformationForItem($item);
247 if ($type_information ===
null) {
251 return $type_information->getTypeHandler();
260 return $this->information;
269 return $this->getTypeInformationCollection()->get(get_class($item));
277 return $this->type_information_collection;
An exception for terminatinating execution or to throw for unit testing.
Class AbstractBaseCollector.
Class TypeInformationCollection.
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
prepareItemsForUIRepresentation()
getTypeInformationForItem(isItem $item)
getSingleItemFromRaw(IdentificationInterface $identification)
sortItemsForUIRepresentation()
$type_information_collection
getItemsForUIRepresentation()
This will return all available isTopItem (and moved isInterchangeableItem), stacked based on the conf...
getSingleItemFromFilter(IdentificationInterface $identification)
cleanupItemsForUIRepresentation()
__construct(array $providers, MainMenuItemFactory $factory, ItemInformation $information=null)
MainMenuMainCollector constructor.
filterItemsByVisibilty(bool $async_only=false)
getTypeHandlerForItem(isItem $item)
getTypeInformationCollection()
getProviderIdentification()
@inheritDoc
Class MainMenuItemFactory.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Interface IdentificationInterface.
Interface hasSymbol Methods for Entries with Symbols.
setTypeInformation(TypeInformation $information)
Interface supportsAsynchronousLoading.
Interface StaticMainMenuProvider.