You are here

public function PluginManager::__construct in Views (for Drupal 7) 8.3

Constructs a PluginManager object.

File

lib/Drupal/views/Plugin/Type/PluginManager.php, line 28
Definition of Drupal\views\Plugin\Type\PluginManager.

Class

PluginManager

Namespace

Drupal\views\Plugin\Type

Code

public function __construct($type) {

  // @todo Remove this hack in http://drupal.org/node/1708404.
  views_init();
  $this->discovery = new CacheDecorator(new AlterDecorator(new AnnotatedClassDiscovery('views', $type), 'views_plugins_' . $type), 'views:' . $type, 'views_info');
  $this->factory = new DefaultFactory($this);
  $this->coreModules = views_core_modules();
  $this->defaults += array(
    'parent' => 'parent',
    'plugin_type' => $type,
  );
}