You are here

public function DefaultSingleLazyPluginCollection::getConfiguration in Drupal 9

Same name and namespace in other branches
  1. 8 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 68

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 (PluginHelper::isConfigurable($plugin)) {
    return $plugin
      ->getConfiguration();
  }
  else {
    return $this->configuration;
  }
}