Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
currently there is no possibility to alter build array of block which renders through Panels module. In PanelsDisplayVariant.php we have a method buildRegions which render available blocks, so it would be very useful to get hook_alter similar to BlockViewBuilder so other modules will have a way to affect on block build array.
Comment | File | Size | Author |
---|---|---|---|
#22 | alter_block_during-2559533-21.patch | 6.15 KB | piggito |
|
Comments
Comment #2
welly CreditAttribution: welly at PreviousNext commentedI needed this very thing this morning on a project. Together with jibran, we've come up with a patch. Can we get a review?
Comment #3
jibranComment #5
welly CreditAttribution: welly at PreviousNext commentedFixed patch
Comment #7
welly CreditAttribution: welly at PreviousNext commentedPatch updated to inject dependency into InPlaceEditorDisplayBuilder class
Comment #9
welly CreditAttribution: welly at PreviousNext commentedLet's try again.
Comment #10
welly CreditAttribution: welly at PreviousNext commentedComment #12
welly CreditAttribution: welly at PreviousNext commentedFixed failed test (hopefully)
Comment #13
welly CreditAttribution: welly at PreviousNext commentedComment #15
jibranComment #18
jibranComment #19
jibranComment #20
piggito CreditAttribution: piggito as a volunteer and at Skilld commentedI'm adding a patch to include hook_block_build_alter too.
Comment #22
piggito CreditAttribution: piggito as a volunteer and at Skilld commentedI made a mistake in my last patch, I'm adding the correct one.
Comment #23
AndyF CreditAttribution: AndyF at TES Global commentedComment #24
jibranI don't think it is a feature request and it's not a bug it is just a missing functionality so I changed it to a task. Core has hook specific tests to verify the implementation is working correctly but I have not seen this practice in contrib so I think with a green patch it is RTBC.
Comment #27
samuel.mortensonThis makes a lot of sense, and doesn't seem to interfere with my existing Panels sites. Thank all!