You are here

public function TestLazyPluginCollection::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 31
Contains \Drupal\plugin_test\Plugin\TestLazyPluginCollection.

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