public function ViewsPluginManager::__construct

Constructs a ViewsPluginManager object.

Parameters

string $type: The plugin type, for example filter.

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations,

File

drupal/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php, line 33
Contains \Drupal\views\Plugin\ViewsPluginManager.

Class

ViewsPluginManager
Plugin type manager for all views plugins.

Namespace

Drupal\views\Plugin

Code

public function __construct($type, \Traversable $namespaces) {
  $this->discovery = new AnnotatedClassDiscovery("views/{$type}", $namespaces);
  $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
  $this->discovery = new ProcessDecorator($this->discovery, array(
    $this,
    'processDefinition',
  ));
  $this->discovery = new AlterDecorator($this->discovery, 'views_plugins_' . $type);
  $this->discovery = new CacheDecorator($this->discovery, 'views:' . $type, 'views_info');
  $this->factory = new ContainerFactory($this);
  $this->defaults += array(
    'parent' => 'parent',
    'plugin_type' => $type,
    'module' => 'views',
    'register_theme' => TRUE,
  );
}