function DefaultSingleLazyPluginCollection::__construct

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

Constructs a new DefaultSingleLazyPluginCollection object.

Parameters

\Drupal\Component\Plugin\PluginManagerInterface $manager: The manager to be used for instantiating plugins.

string $instance_id: The ID of the plugin instance.

array $configuration: An array of configuration.

File

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

Class

DefaultSingleLazyPluginCollection
Provides a default plugin collection for a plugin type.

Namespace

Drupal\Core\Plugin

Code

public function __construct(PluginManagerInterface $manager, $instance_id, array $configuration) {
  $this->manager = $manager;
  $this->addInstanceId($instance_id, $configuration);
}

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