You are here

public function PatternLayoutBuilder::build in UI Patterns Layout Builder 8

Build a render array for layout with regions.

Parameters

array $regions: An associative array keyed by region name, containing render arrays representing the content that should be placed in each region.

Return value

array Render array for the layout with regions.

Overrides PatternLayout::build

File

src/Plugin/Layout/PatternLayoutBuilder.php, line 39

Class

PatternLayoutBuilder
Class PatternLayoutBuilder.

Namespace

Drupal\ui_patterns_layout_builder\Plugin\Layout

Code

public function build(array $regions) {
  $build = parent::build($regions);
  $build['#layout'] = $this;
  $build = $build + $build['#fields'];
  return $build;
}