Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php \Drupal\Component\Plugin\Factory\DefaultFactory::__construct()
  2. 9 core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php \Drupal\Component\Plugin\Factory\DefaultFactory::__construct()

Constructs a Drupal\Component\Plugin\Factory\DefaultFactory object.

Parameters

\Drupal\Component\Plugin\Discovery\DiscoveryInterface $discovery: The plugin discovery.

string|null $plugin_interface: (optional) The interface each plugin should implement.

File

core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php, line 44

Class

DefaultFactory
Default plugin factory.

Namespace

Drupal\Component\Plugin\Factory

Code

public function __construct(DiscoveryInterface $discovery, $plugin_interface = NULL) {
  $this->discovery = $discovery;
  $this->interface = $plugin_interface;
}