Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292528

Allow greater flexibility within Section::toRenderArray()

$
0
0

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

  1. Write a patch :-)

User interface changes

None.

API changes

A new event - details to be determined.

Data model changes

None.

Release notes snippet

Todo.


Viewing all articles
Browse latest Browse all 292528

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>