public function DefaultFactory::__construct in Plug 7
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
- lib/
Drupal/ Component/ Plugin/ Factory/ DefaultFactory.php, line 48 - Contains \Drupal\Component\Plugin\Factory\DefaultFactory.
Class
- DefaultFactory
- Default plugin factory.
Namespace
Drupal\Component\Plugin\FactoryCode
public function __construct(DiscoveryInterface $discovery, $plugin_interface = NULL) {
$this->discovery = $discovery;
$this->interface = $plugin_interface;
}