function AttributeDiscoveryWithAnnotationsAutomatedProviders::__construct

Overrides AttributeDiscoveryWithAnnotations::__construct

File

core/modules/migrate/src/Plugin/Discovery/AttributeDiscoveryWithAnnotationsAutomatedProviders.php, line 35

Class

AttributeDiscoveryWithAnnotationsAutomatedProviders
Enables both attribute and annotation discovery for plugin definitions.

Namespace

Drupal\migrate\Plugin\Discovery

Code

public function __construct(string $subdir, \Traversable $rootNamespaces, string $pluginDefinitionAttributeName = 'Drupal\\Component\\Plugin\\Attribute\\Plugin', string $pluginDefinitionAnnotationName = 'Drupal\\Component\\Annotation\\Plugin', array $additionalNamespaces = []) {
    parent::__construct($subdir, $rootNamespaces, $pluginDefinitionAttributeName, $pluginDefinitionAnnotationName, $additionalNamespaces);
    $this->finder = new ClassFinder();
    $this->attributeDiscovery = new AttributeClassDiscoveryAutomatedProviders($subdir, $rootNamespaces, $pluginDefinitionAttributeName);
}

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