Problem/Motivation
In #2942661: Sections should have third-party settings, Section
objects were given third-party settings so that contrib could put some data on Sections, presumably to modify how they work.
However, if a contrib module wanted to change how the section was rendered (for example, modifying the regions before they were passed to the layout, ala region styles), it wouldn't be able because there is no event or alter hook in Section::toRenderArray()
in order to do so.
Also, it would make sense to have such an event, because in #2937799: Allow greater flexibility within SectionComponent::toRenderArray() a similar event is being called in SectionComponent::toRenderArray()
.
Proposed resolution
Call an event in Section::toRenderArray()
allowing contrib modules to modify the $regions
array before it's passed to $layout->build()
.
Remaining tasks
- Write a patch :-)
User interface changes
None.
API changes
A new event - details to be determined.
Data model changes
None.
Release notes snippet
Todo.