You are here

public function DefaultFactory::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 48
Contains \Drupal\Component\Plugin\Factory\DefaultFactory.

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