public function DefaultLazyPluginCollection::getConfiguration in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php \Drupal\Core\Plugin\DefaultLazyPluginCollection::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
2 calls to DefaultLazyPluginCollection::getConfiguration()
- ConditionPluginCollection::getConfiguration in core/
lib/ Drupal/ Core/ Condition/ ConditionPluginCollection.php - Gets the current configuration of all plugins in this collection.
- FilterPluginCollection::getConfiguration in core/
modules/ filter/ src/ FilterPluginCollection.php - Gets the current configuration of all plugins in this collection.
2 methods override DefaultLazyPluginCollection::getConfiguration()
- ConditionPluginCollection::getConfiguration in core/
lib/ Drupal/ Core/ Condition/ ConditionPluginCollection.php - Gets the current configuration of all plugins in this collection.
- FilterPluginCollection::getConfiguration in core/
modules/ filter/ src/ FilterPluginCollection.php - Gets the current configuration of all plugins in this collection.
File
- core/
lib/ Drupal/ Core/ Plugin/ DefaultLazyPluginCollection.php, line 111 - Contains \Drupal\Core\Plugin\DefaultLazyPluginCollection.
Class
- DefaultLazyPluginCollection
- Provides a default plugin collection for a plugin type.
Namespace
Drupal\Core\PluginCode
public function getConfiguration() {
$instances = array();
// Store the current order of the instances.
$current_order = $this->instanceIDs;
// Reorder the instances to match the original order, adding new instances
// to the end.
$this->instanceIDs = $this->originalOrder + $current_order;
foreach ($this as $instance_id => $instance) {
if ($instance instanceof ConfigurablePluginInterface) {
$instances[$instance_id] = $instance
->getConfiguration();
}
else {
$instances[$instance_id] = $this->configurations[$instance_id];
}
}
// Restore the current order.
$this->instanceIDs = $current_order;
return $instances;
}