19 declare(strict_types=1);
74 $settings->setHashing(
true);
75 $settings->setLogging(
false);
94 foreach ($this->providers as $provider) {
95 $context_collection = $provider->isInterestedInContexts();
96 if (!$context_collection->hasMatch($called_contexts)) {
101 $content_modification = $provider->getContentModification($called_contexts);
102 $this->
replaceModification($final_content_modification, $content_modification, ContentModification::class);
104 $logo_modification = $provider->getLogoModification($called_contexts);
105 $this->
replaceModification($final_logo_modification, $logo_modification, LogoModification::class);
107 $responsive_logo_modification = $provider->getResponsiveLogoModification($called_contexts);
109 $final_responsive_logo_modification,
110 $responsive_logo_modification,
111 LogoModification::class
114 $breadcrumbs_modification = $provider->getBreadCrumbsModification($called_contexts);
116 $final_breadcrumbs_modification,
117 $breadcrumbs_modification,
118 BreadCrumbsModification::class
121 $main_bar_modification = $provider->getMainBarModification($called_contexts);
123 $final_main_bar_modification,
124 $main_bar_modification,
125 MainBarModification::class
128 $meta_bar_modification = $provider->getMetaBarModification($called_contexts);
130 $final_meta_bar_modification,
131 $meta_bar_modification,
132 MetaBarModification::class
135 $footer_modification = $provider->getFooterModification($called_contexts);
136 $this->
replaceModification($final_footer_modification, $footer_modification, FooterModification::class);
138 $page_modification = $provider->getPageBuilderDecorator($called_contexts);
139 $this->
replaceModification($final_page_modification, $page_modification, PageBuilderModification::class);
141 $title_modification = $provider->getTitleModification($called_contexts);
142 $this->
replaceModification($final_title_modification, $title_modification, TitleModification::class);
144 $short_title_modification = $provider->getShortTitleModification($called_contexts);
145 $this->
replaceModification($final_short_title_modification, $short_title_modification, ShortTitleModification::class);
147 $view_title_modification = $provider->getViewTitleModification($called_contexts);
149 $final_view_title_modification,
150 $view_title_modification,
151 ViewTitleModification::class
155 if ($final_content_modification->hasValidModification()) {
156 $this->modification_handler->modifyContentWithClosure($final_content_modification->getModification());
158 if ($final_logo_modification->hasValidModification()) {
159 $this->modification_handler->modifyLogoWithClosure($final_logo_modification->getModification());
161 if ($final_responsive_logo_modification->hasValidModification()) {
162 $this->modification_handler->modifyResponsiveLogoWithClosure($final_responsive_logo_modification->getModification());
164 if ($final_breadcrumbs_modification->hasValidModification()) {
165 $this->modification_handler->modifyBreadCrumbsWithClosure($final_breadcrumbs_modification->getModification());
167 if ($final_main_bar_modification->hasValidModification()) {
168 $this->modification_handler->modifyMainBarWithClosure($final_main_bar_modification->getModification());
170 if ($final_meta_bar_modification->hasValidModification()) {
171 $this->modification_handler->modifyMetaBarWithClosure($final_meta_bar_modification->getModification());
173 if ($final_footer_modification->hasValidModification()) {
174 $this->modification_handler->modifyFooterWithClosure($final_footer_modification->getModification());
176 if ($final_page_modification->hasValidModification()) {
177 $this->modification_handler->modifyPageBuilderWithClosure($final_page_modification->getModification());
179 if ($final_title_modification->hasValidModification()) {
180 $this->modification_handler->modifyTitleWithClosure($final_title_modification->getModification());
182 if ($final_short_title_modification->hasValidModification()) {
183 $this->modification_handler->modifyShortTitleWithClosure($final_short_title_modification->getModification());
185 if ($final_view_title_modification->hasValidModification()) {
186 $this->modification_handler->modifyViewTitleWithClosure($final_view_title_modification->getModification());
235 throw new LogicException(
"There are competing Modifications for $type with the same priority ({$candicate->getPriority()})");
237 $current_modification = $candicate;
249 return $this->modification_handler->getPageWithPagePartProviders();
258 $called_contexts = $DIC->globalScreen()->tool()->context()->stack();
260 return $called_contexts;
270 return $DIC->globalScreen()->layout()->meta();
cleanupItemsForUIRepresentation()
Class MainLayoutCollector.
replaceModification(LayoutModification &$current_modification, ?LayoutModification $candicate, string $type)
__construct(array $providers)
MainLayoutCollector constructor.
getItemsForUIRepresentation()
Class AbstractBaseCollector.
if($_SERVER['argc']< 4) $client
collectOnce()
Runs the Collection of all items from the providers.
filterItemsByVisibilty(bool $skip_async=false)
sortItemsForUIRepresentation()
prepareItemsForUIRepresentation()
Class LayoutModification.