function DefaultLazyPluginCollection::addInstanceId

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php \Drupal\Core\Plugin\DefaultLazyPluginCollection::addInstanceId()
  2. 10 core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php \Drupal\Core\Plugin\DefaultLazyPluginCollection::addInstanceId()
  3. 11.x core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php \Drupal\Core\Plugin\DefaultLazyPluginCollection::addInstanceId()

Overrides LazyPluginCollection::addInstanceId

File

core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php, line 169

Class

DefaultLazyPluginCollection
Provides a default plugin collection for a plugin type.

Namespace

Drupal\Core\Plugin

Code

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;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.