3 declare(strict_types=1);
92 $context_collection = $provider->isInterestedInContexts();
93 if (!$context_collection->hasMatch($called_contexts)) {
98 $content_modification = $provider->getContentModification($called_contexts);
99 $this->
replaceModification($final_content_modification, $content_modification, ContentModification::class);
101 $logo_modification = $provider->getLogoModification($called_contexts);
102 $this->
replaceModification($final_logo_modification, $logo_modification, LogoModification::class);
104 $responsive_logo_modification = $provider->getResponsiveLogoModification($called_contexts);
106 $final_responsive_logo_modification,
107 $responsive_logo_modification,
108 LogoModification::class
111 $breadcrumbs_modification = $provider->getBreadCrumbsModification($called_contexts);
113 $final_breadcrumbs_modification,
114 $breadcrumbs_modification,
115 BreadCrumbsModification::class
118 $main_bar_modification = $provider->getMainBarModification($called_contexts);
120 $final_main_bar_modification,
121 $main_bar_modification,
122 MainBarModification::class
125 $meta_bar_modification = $provider->getMetaBarModification($called_contexts);
127 $final_meta_bar_modification,
128 $meta_bar_modification,
129 MetaBarModification::class
132 $footer_modification = $provider->getFooterModification($called_contexts);
133 $this->
replaceModification($final_footer_modification, $footer_modification, FooterModification::class);
135 $page_modification = $provider->getPageBuilderDecorator($called_contexts);
136 $this->
replaceModification($final_page_modification, $page_modification, PageBuilderModification::class);
138 $title_modification = $provider->getTitleModification($called_contexts);
139 $this->
replaceModification($final_title_modification, $title_modification, TitleModification::class);
141 $short_title_modification = $provider->getShortTitleModification($called_contexts);
142 $this->
replaceModification($final_short_title_modification, $short_title_modification, ShortTitleModification::class);
144 $view_title_modification = $provider->getViewTitleModification($called_contexts);
146 $final_view_title_modification,
147 $view_title_modification,
148 ViewTitleModification::class
152 if ($final_content_modification->hasValidModification()) {
153 $this->modification_handler->modifyContentWithClosure($final_content_modification->getModification());
155 if ($final_logo_modification->hasValidModification()) {
156 $this->modification_handler->modifyLogoWithClosure($final_logo_modification->getModification());
158 if ($final_responsive_logo_modification->hasValidModification()) {
159 $this->modification_handler->modifyResponsiveLogoWithClosure($final_responsive_logo_modification->getModification());
161 if ($final_breadcrumbs_modification->hasValidModification()) {
162 $this->modification_handler->modifyBreadCrumbsWithClosure($final_breadcrumbs_modification->getModification());
164 if ($final_main_bar_modification->hasValidModification()) {
165 $this->modification_handler->modifyMainBarWithClosure($final_main_bar_modification->getModification());
167 if ($final_meta_bar_modification->hasValidModification()) {
168 $this->modification_handler->modifyMetaBarWithClosure($final_meta_bar_modification->getModification());
170 if ($final_footer_modification->hasValidModification()) {
171 $this->modification_handler->modifyFooterWithClosure($final_footer_modification->getModification());
173 if ($final_page_modification->hasValidModification()) {
174 $this->modification_handler->modifyPageBuilderWithClosure($final_page_modification->getModification());
176 if ($final_title_modification->hasValidModification()) {
177 $this->modification_handler->modifyTitleWithClosure($final_title_modification->getModification());
179 if ($final_short_title_modification->hasValidModification()) {
180 $this->modification_handler->modifyShortTitleWithClosure($final_short_title_modification->getModification());
182 if ($final_view_title_modification->hasValidModification()) {
183 $this->modification_handler->modifyViewTitleWithClosure($final_view_title_modification->getModification());
232 throw new LogicException(
"There are competing Modifications for $type with the same priority ({$candicate->getPriority()})");
234 $current_modification = $candicate;
246 return $this->modification_handler->getPageWithPagePartProviders();
255 $called_contexts = $DIC->globalScreen()->tool()->context()->stack();
257 return $called_contexts;
267 return $DIC->globalScreen()->layout()->meta();
cleanupItemsForUIRepresentation()
Class MainLayoutCollector.
replaceModification(LayoutModification &$current_modification, ?LayoutModification $candicate, string $type)
__construct(array $providers)
MainLayoutCollector constructor.
getItemsForUIRepresentation()
Class AbstractBaseCollector.
collectOnce()
Runs the Collection of all items from the providers.
ModificationHandler $modification_handler
filterItemsByVisibilty(bool $skip_async=false)
sortItemsForUIRepresentation()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareItemsForUIRepresentation()
Class LayoutModification.