Commit 770900b5 authored by webchick's avatar webchick
Browse files

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

Issue #2087551 by donquixote: ViewsHandlerDiscovery: Remove ->pluginNamespaces setup from constructor.
parent bbb106da
......@@ -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;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment