public function DefaultLazyPluginCollection::addInstanceId in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php \Drupal\Core\Plugin\DefaultLazyPluginCollection::addInstanceId()
Adds an instance ID to the available instance IDs.
Parameters
string $id: The ID of the plugin instance to add.
array|null $configuration: (optional) The configuration used by this instance. Defaults to NULL.
Overrides LazyPluginCollection::addInstanceId
File
- core/
lib/ Drupal/ Core/ Plugin/ DefaultLazyPluginCollection.php, line 174 - Contains \Drupal\Core\Plugin\DefaultLazyPluginCollection.
Class
- DefaultLazyPluginCollection
- Provides a default plugin collection for a plugin type.
Namespace
Drupal\Core\PluginCode
public function addInstanceId($id, $configuration = NULL) {
parent::addInstanceId($id);
if ($configuration !== NULL) {
$this
->setInstanceConfiguration($id, $configuration);
}
if (!isset($this->originalOrder[$id])) {
$this->originalOrder[$id] = $id;
}
}