Skip to content
Snippets Groups Projects
Commit 770900b5 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2087551 by donquixote: ViewsHandlerDiscovery: Remove ->pluginNamespaces...

Issue #2087551 by donquixote: ViewsHandlerDiscovery: Remove ->pluginNamespaces setup from constructor.
parent bbb106da
Branches
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -21,13 +21,6 @@ class ViewsHandlerDiscovery extends AnnotatedClassDiscovery {
*/
protected $type;
/**
* An object containing the namespaces to look for plugin implementations.
*
* @var \Traversable
*/
protected $rootNamespacesIterator;
/**
* Constructs a ViewsHandlerDiscovery object.
*
......@@ -39,15 +32,7 @@ class ViewsHandlerDiscovery extends AnnotatedClassDiscovery {
*/
function __construct($type, \Traversable $root_namespaces) {
$this->type = $type;
$this->rootNamespacesIterator = $root_namespaces;
$plugin_namespaces = array();
foreach ($root_namespaces as $namespace => $dir) {
$plugin_namespaces["$namespace\\Plugin\\views\\{$type}"] = array($dir);
}
$this->pluginNamespaces = $plugin_namespaces;
$this->pluginDefinitionAnnotationName = 'Drupal\Component\Annotation\PluginID';
parent::__construct("Plugin/views/$type", $root_namespaces, 'Drupal\Component\Annotation\PluginID');
}
/**
......@@ -62,16 +47,4 @@ public function getDefinitions() {
return $definitions;
}
/**
* {@inheritdoc}
*/
protected function getPluginNamespaces() {
$plugin_namespaces = array();
foreach ($this->rootNamespacesIterator as $namespace => $dir) {
$plugin_namespaces["$namespace\\Plugin\\views\\{$this->type}"] = array($dir);
}
return $plugin_namespaces;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment