public function LazyPluginCollection::addInstanceId in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/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.
3 calls to LazyPluginCollection::addInstanceId()
- DefaultLazyPluginCollection::addInstanceId in core/
lib/ Drupal/ Core/ Plugin/ DefaultLazyPluginCollection.php - Adds an instance ID to the available instance IDs.
- DefaultSingleLazyPluginCollection::addInstanceId in core/
lib/ Drupal/ Core/ Plugin/ DefaultSingleLazyPluginCollection.php - Adds an instance ID to the available instance IDs.
- LazyPluginCollection::set in core/
lib/ Drupal/ Component/ Plugin/ LazyPluginCollection.php - Stores an initialized plugin.
2 methods override LazyPluginCollection::addInstanceId()
- DefaultLazyPluginCollection::addInstanceId in core/
lib/ Drupal/ Core/ Plugin/ DefaultLazyPluginCollection.php - Adds an instance ID to the available instance IDs.
- DefaultSingleLazyPluginCollection::addInstanceId in core/
lib/ Drupal/ Core/ Plugin/ DefaultSingleLazyPluginCollection.php - Adds an instance ID to the available instance IDs.
File
- core/
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;
}
}