You are here

public function KeyPluginCollection::addInstanceId in Key 8

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 DefaultSingleLazyPluginCollection::addInstanceId

File

src/Plugin/KeyPluginCollection.php, line 15

Class

KeyPluginCollection
Provides a container for lazily loading key plugins.

Namespace

Drupal\key\Plugin

Code

public function addInstanceId($id, $configuration = NULL) {
  $this->instanceId = $id;
  parent::addInstanceId($id, $configuration);
  if ($configuration !== NULL) {
    $this
      ->setConfiguration($configuration);
  }
}