function BlockDisplayVariant::setConfiguration

Same name in other branches
  1. 8.x-3.x src/Plugin/DisplayVariant/BlockDisplayVariant.php \Drupal\ctools\Plugin\DisplayVariant\BlockDisplayVariant::setConfiguration()

Overrides VariantBase::setConfiguration

File

src/Plugin/DisplayVariant/BlockDisplayVariant.php, line 147

Class

BlockDisplayVariant
Provides a base class for a display variant that simply contains blocks.

Namespace

Drupal\ctools\Plugin\DisplayVariant

Code

public function setConfiguration(array $configuration) {
    // Preserve the uuid.
    if ($this->configuration && !empty($this->configuration['uuid'])) {
        $configuration['uuid'] = $this->configuration['uuid'];
    }
    parent::setConfiguration($configuration);
    $this->getBlockCollection()
        ->setConfiguration($this->configuration['blocks']);
    return $this;
}