You are here

public function PatternSettingsLayout::build in UI Patterns Settings 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Layout/PatternSettingsLayout.php \Drupal\ui_patterns_settings\Plugin\Layout\PatternSettingsLayout::build()

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/PatternSettingsLayout.php, line 17

Class

PatternSettingsLayout
Class PatternSettingsLayout.

Namespace

Drupal\ui_patterns_settings\Plugin\Layout

Code

public function build(array $regions) {
  $build = parent::build($regions);
  $configuration = $this
    ->getConfiguration();
  if (isset($configuration['pattern']['settings'])) {
    $build['#settings'] = $configuration['pattern']['settings'];
  }
  return $build;
}