You are here

public function DefaultPluginManager::__construct in Service Container 7.2

Same name in this branch
  1. 7.2 src/Plugin/DefaultPluginManager.php \Drupal\service_container\Plugin\DefaultPluginManager::__construct()
  2. 7.2 lib/Drupal/Component/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::__construct()
Same name and namespace in other branches
  1. 7 src/Plugin/DefaultPluginManager.php \Drupal\service_container\Plugin\DefaultPluginManager::__construct()

Constructs a DefaultPluginManager object.

Parameters

DiscoveryInterface $discovery: The discovery object used to find plugins.

1 call to DefaultPluginManager::__construct()
ServiceProviderPluginManager::__construct in src/DependencyInjection/ServiceProviderPluginManager.php
Constructs a ServiceProviderPluginManager object.
1 method overrides DefaultPluginManager::__construct()
ServiceProviderPluginManager::__construct in src/DependencyInjection/ServiceProviderPluginManager.php
Constructs a ServiceProviderPluginManager object.

File

src/Plugin/DefaultPluginManager.php, line 23
Contains \Drupal\service_container\Plugin\DefaultPluginManager

Class

DefaultPluginManager
Defines a plugin manager used for discovering generic plugins.

Namespace

Drupal\service_container\Plugin

Code

public function __construct(DiscoveryInterface $discovery) {
  $this->discovery = $discovery;

  // Use a generic factory.
  $this->factory = new DefaultFactory($this->discovery);
}