19 declare(strict_types=1);
66 $settings->setHashing(
true);
67 $settings->setLogging(
false);
87 $context_collection = $provider->isInterestedInContexts();
88 if (!$context_collection->hasMatch($called_contexts)) {
93 $content_modification = $provider->getContentModification($called_contexts);
94 $this->
replaceModification($final_content_modification, $content_modification, ContentModification::class);
96 $logo_modification = $provider->getLogoModification($called_contexts);
97 $this->
replaceModification($final_logo_modification, $logo_modification, LogoModification::class);
99 $responsive_logo_modification = $provider->getResponsiveLogoModification($called_contexts);
101 $final_responsive_logo_modification,
102 $responsive_logo_modification,
103 LogoModification::class
106 $breadcrumbs_modification = $provider->getBreadCrumbsModification($called_contexts);
108 $final_breadcrumbs_modification,
109 $breadcrumbs_modification,
110 BreadCrumbsModification::class
113 $main_bar_modification = $provider->getMainBarModification($called_contexts);
115 $final_main_bar_modification,
116 $main_bar_modification,
117 MainBarModification::class
120 $meta_bar_modification = $provider->getMetaBarModification($called_contexts);
122 $final_meta_bar_modification,
123 $meta_bar_modification,
124 MetaBarModification::class
127 $footer_modification = $provider->getFooterModification($called_contexts);
128 $this->
replaceModification($final_footer_modification, $footer_modification, FooterModification::class);
130 $page_modification = $provider->getPageBuilderDecorator($called_contexts);
131 $this->
replaceModification($final_page_modification, $page_modification, PageBuilderModification::class);
133 $title_modification = $provider->getTitleModification($called_contexts);
134 $this->
replaceModification($final_title_modification, $title_modification, TitleModification::class);
136 $short_title_modification = $provider->getShortTitleModification($called_contexts);
137 $this->
replaceModification($final_short_title_modification, $short_title_modification, ShortTitleModification::class);
139 $view_title_modification = $provider->getViewTitleModification($called_contexts);
141 $final_view_title_modification,
142 $view_title_modification,
143 ViewTitleModification::class
147 if ($final_content_modification->hasValidModification()) {
148 $this->modification_handler->modifyContentWithClosure($final_content_modification->getModification());
150 if ($final_logo_modification->hasValidModification()) {
151 $this->modification_handler->modifyLogoWithClosure($final_logo_modification->getModification());
153 if ($final_responsive_logo_modification->hasValidModification()) {
154 $this->modification_handler->modifyResponsiveLogoWithClosure($final_responsive_logo_modification->getModification());
156 if ($final_breadcrumbs_modification->hasValidModification()) {
157 $this->modification_handler->modifyBreadCrumbsWithClosure($final_breadcrumbs_modification->getModification());
159 if ($final_main_bar_modification->hasValidModification()) {
160 $this->modification_handler->modifyMainBarWithClosure($final_main_bar_modification->getModification());
162 if ($final_meta_bar_modification->hasValidModification()) {
163 $this->modification_handler->modifyMetaBarWithClosure($final_meta_bar_modification->getModification());
165 if ($final_footer_modification->hasValidModification()) {
166 $this->modification_handler->modifyFooterWithClosure($final_footer_modification->getModification());
168 if ($final_page_modification->hasValidModification()) {
169 $this->modification_handler->modifyPageBuilderWithClosure($final_page_modification->getModification());
171 if ($final_title_modification->hasValidModification()) {
172 $this->modification_handler->modifyTitleWithClosure($final_title_modification->getModification());
174 if ($final_short_title_modification->hasValidModification()) {
175 $this->modification_handler->modifyShortTitleWithClosure($final_short_title_modification->getModification());
177 if ($final_view_title_modification->hasValidModification()) {
178 $this->modification_handler->modifyViewTitleWithClosure($final_view_title_modification->getModification());
227 throw new LogicException(
"There are competing Modifications for $type with the same priority ({$candicate->getPriority()})");
230 $current_modification = $candicate;
242 return $this->modification_handler->getPageWithPagePartProviders();
251 $called_contexts = $DIC->globalScreen()->tool()->context()->stack();
253 return $called_contexts;
263 return $DIC->globalScreen()->layout()->meta();
collectOnce()
Runs the Collection of all items from the providers.
cleanupItemsForUIRepresentation()
Class MainLayoutCollector.
replaceModification(LayoutModification &$current_modification, ?LayoutModification $candicate, string $type)
getItemsForUIRepresentation()
Class AbstractBaseCollector.
ModificationHandler $modification_handler
filterItemsByVisibilty(bool $skip_async=false)
sortItemsForUIRepresentation()
prepareItemsForUIRepresentation()
Class LayoutModification.
__construct(private array $providers)
MainLayoutCollector constructor.