function TestLazyPluginCollection::initializePlugin

Same name in other branches
  1. 9 core/modules/system/tests/modules/plugin_test/src/Plugin/TestLazyPluginCollection.php \Drupal\plugin_test\Plugin\TestLazyPluginCollection::initializePlugin()
  2. 10 core/modules/system/tests/modules/plugin_test/src/Plugin/TestLazyPluginCollection.php \Drupal\plugin_test\Plugin\TestLazyPluginCollection::initializePlugin()
  3. 11.x core/modules/system/tests/modules/plugin_test/src/Plugin/TestLazyPluginCollection.php \Drupal\plugin_test\Plugin\TestLazyPluginCollection::initializePlugin()

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, []);
}

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