You are here

public function DefaultSingleLazyPluginCollection::getConfiguration 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::getConfiguration()

Gets the current configuration of all plugins in this collection.

Return value

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

Overrides LazyPluginCollection::getConfiguration

File

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

Class

DefaultSingleLazyPluginCollection
Provides a default plugin collection for a plugin type.

Namespace

Drupal\Core\Plugin

Code

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