Constructs a ViewsHandlerDiscovery object.
string $type: The plugin type, for example filter.
\Traversable $root_namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations,
Overrides AnnotatedClassDiscovery::__construct
function __construct($type, \Traversable $root_namespaces) {
$this->type = $type;
$this->rootNamespacesIterator = $root_namespaces;
$annotation_namespaces = array(
'Drupal\\Component\\Annotation' => DRUPAL_ROOT . '/core/lib',
);
$plugin_namespaces = array();
foreach ($root_namespaces as $namespace => $dir) {
$plugin_namespaces["{$namespace}\\Plugin\\views\\{$type}"] = array(
$dir,
);
}
parent::__construct($plugin_namespaces, $annotation_namespaces, 'Drupal\\Component\\Annotation\\PluginID');
}