You are here

protected function DefaultSingleLazyPluginCollection::initializePlugin in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection::initializePlugin()

Initializes and stores a plugin.

Parameters

string $instance_id: The ID of the plugin instance to initialize.

Overrides LazyPluginCollection::initializePlugin

2 calls to DefaultSingleLazyPluginCollection::initializePlugin()
BlockPluginCollection::initializePlugin in core/modules/block/src/BlockPluginCollection.php
Initializes and stores a plugin.
SearchPluginCollection::initializePlugin in core/modules/search/src/Plugin/SearchPluginCollection.php
Initializes and stores a plugin.
2 methods override DefaultSingleLazyPluginCollection::initializePlugin()
BlockPluginCollection::initializePlugin in core/modules/block/src/BlockPluginCollection.php
Initializes and stores a plugin.
SearchPluginCollection::initializePlugin in core/modules/search/src/Plugin/SearchPluginCollection.php
Initializes and stores a plugin.

File

core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php, line 61

Class

DefaultSingleLazyPluginCollection
Provides a default plugin collection for a plugin type.

Namespace

Drupal\Core\Plugin

Code

protected function initializePlugin($instance_id) {
  $this
    ->set($instance_id, $this->manager
    ->createInstance($instance_id, $this->configuration));
}