You are here

public function StaticLayout::__construct in Layout 8.2

Overrides Drupal\Component\Plugin\PluginBase::__construct().

Overrides PluginBase::__construct

File

lib/Drupal/layout/Plugin/Layout/StaticLayout.php, line 25
Contains \Drupal\layout\Plugin\Layout\StaticLayout.

Class

StaticLayout
Plugin annotation @Plugin( id = "static_layout", derivative = "Drupal\layout\Plugin\Derivative\Layout" )

Namespace

Drupal\layout\Plugin\Layout

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition) {
  foreach ($plugin_definition['regions'] as $region => $title) {
    if (!isset($configuration['regions'][$region])) {
      $configuration['regions'][$region] = array();
    }
  }
  parent::__construct($configuration, $plugin_id, $plugin_definition);
}