You are here

public function DefaultSingleLazyPluginCollection::setConfiguration in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection::setConfiguration()

Sets the configuration for all plugins in this collection.

Parameters

array $configuration: An array of up-to-date plugin configuration.

Return value

$this

Overrides LazyPluginCollection::setConfiguration

1 call to DefaultSingleLazyPluginCollection::setConfiguration()
DefaultSingleLazyPluginCollection::addInstanceId in core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php
Adds an instance ID to the available instance IDs.

File

core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php, line 89
Contains \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection.

Class

DefaultSingleLazyPluginCollection
Provides a default plugin collection for a plugin type.

Namespace

Drupal\Core\Plugin

Code

public function setConfiguration($configuration) {
  $plugin = $this
    ->get($this->instanceId);
  if ($plugin instanceof ConfigurablePluginInterface) {
    $plugin
      ->setConfiguration($configuration);
  }
  $this->configuration = $configuration;
  return $this;
}