Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AnnotatedClassDiscoveryAutomatedProviders.php

function AnnotatedClassDiscoveryAutomatedProviders::__construct

Constructs an AnnotatedClassDiscoveryAutomatedProviders object.

Parameters

string $subdir: Either the plugin's subdirectory, for example 'Plugin/views/filter', or empty string if plugins are located at the top level of the namespace.

\Traversable $root_namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations. If $subdir is not an empty string, it will be appended to each namespace.

string $plugin_definition_annotation_name: The name of the annotation that contains the plugin definition. Defaults to 'Drupal\Component\Annotation\Plugin'.

string[] $annotation_namespaces: Additional namespaces to scan for annotation definitions.

Overrides AnnotatedClassDiscovery::__construct

File

core/modules/migrate/src/Plugin/Discovery/AnnotatedClassDiscoveryAutomatedProviders.php, line 46

Class

AnnotatedClassDiscoveryAutomatedProviders
Determines providers based on a class's and its parent's namespaces.

Namespace

Drupal\migrate\Plugin\Discovery

Code

public function __construct($subdir, \Traversable $root_namespaces, $plugin_definition_annotation_name = 'Drupal\\Component\\Annotation\\Plugin', array $annotation_namespaces = []) {
    parent::__construct($subdir, $root_namespaces, $plugin_definition_annotation_name, $annotation_namespaces);
    $this->finder = new ClassFinder();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal