function DefaultSingleLazyPluginCollection::setConfiguration
Same name in other branches
- 9 core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection::setConfiguration()
- 8.9.x core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection::setConfiguration()
- 11.x core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection::setConfiguration()
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 81
Class
- DefaultSingleLazyPluginCollection
- Provides a default plugin collection for a plugin type.
Namespace
Drupal\Core\PluginCode
public function setConfiguration($configuration) {
if (!is_array($configuration)) {
@trigger_error('Calling ' . __METHOD__ . '() with a non-array argument is deprecated in drupal:10.3.0 and will fail in drupal:11.0.0. See https://www.drupal.org/node/3406191', E_USER_DEPRECATED);
$configuration = [];
}
$this->configuration = $configuration;
$plugin = $this->get($this->instanceId);
if ($plugin instanceof ConfigurableInterface) {
$plugin->setConfiguration($configuration);
}
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.