You are here

protected function TestLazyPluginCollection::initializePlugin in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/plugin_test/src/Plugin/TestLazyPluginCollection.php \Drupal\plugin_test\Plugin\TestLazyPluginCollection::initializePlugin()

Initializes and stores a plugin.

Parameters

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

Overrides LazyPluginCollection::initializePlugin

File

core/modules/system/tests/modules/plugin_test/src/Plugin/TestLazyPluginCollection.php, line 36

Class

TestLazyPluginCollection
Defines a plugin collection which uses fruit plugins.

Namespace

Drupal\plugin_test\Plugin

Code

protected function initializePlugin($instance_id) {
  $this->pluginInstances[$instance_id] = $this->manager
    ->createInstance($instance_id, []);
}