Skip to content
Snippets Groups Projects

Issue #3444711: Add regions to build array to make contextual working

Merged christian.wiedemann requested to merge issue/ui_patterns-3444711:2.0.x into 2.0.x
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
@@ -48,6 +48,10 @@ class ComponentLayout extends LayoutDefault implements PluginFormInterface {
@@ -48,6 +48,10 @@ class ComponentLayout extends LayoutDefault implements PluginFormInterface {
foreach ($this->getPluginDefinition()->getRegionNames() as $region_name) {
foreach ($this->getPluginDefinition()->getRegionNames() as $region_name) {
if (array_key_exists($region_name, $regions)) {
if (array_key_exists($region_name, $regions)) {
$build['#slots'][$region_name] = $regions[$region_name];
$build['#slots'][$region_name] = $regions[$region_name];
 
// For layout builder we need to pass slots also
 
// direct to the build array. They are needed to generate contextual links
 
// and other surrounding markup.
 
$build[$region_name] = $regions[$region_name];
}
}
}
}
return $build;
return $build;
Loading