public function LazyPluginCollection::addInstanceId in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/Component/Plugin/LazyPluginCollection.php \Drupal\Component\Plugin\LazyPluginCollection::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.
1 call to LazyPluginCollection::addInstanceId()
- LazyPluginCollection::set in lib/
Drupal/ Component/ Plugin/ LazyPluginCollection.php - Stores an initialized plugin.
File
- lib/
Drupal/ Component/ Plugin/ LazyPluginCollection.php, line 123 - Contains \Drupal\Component\Plugin\LazyPluginCollection.
Class
- LazyPluginCollection
- Defines an object which stores multiple plugin instances to lazy load them.
Namespace
Drupal\Component\PluginCode
public function addInstanceId($id, $configuration = NULL) {
if (!isset($this->instanceIDs[$id])) {
$this->instanceIDs[$id] = $id;
}
}