You are here

public function TestLazyPluginCollection::__construct in Drupal 10

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::__construct()
  2. 9 core/modules/system/tests/modules/plugin_test/src/Plugin/TestLazyPluginCollection.php \Drupal\plugin_test\Plugin\TestLazyPluginCollection::__construct()

Constructs a TestLazyPluginCollection object.

Parameters

\Drupal\Component\Plugin\PluginManagerInterface $manager: The plugin manager that handles test plugins.

File

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

Class

TestLazyPluginCollection
Defines a plugin collection which uses fruit plugins.

Namespace

Drupal\plugin_test\Plugin

Code

public function __construct(PluginManagerInterface $manager) {
  $this->manager = $manager;
  $instance_ids = array_keys($this->manager
    ->getDefinitions());
  $this->instanceIds = array_combine($instance_ids, $instance_ids);
}