ViewsPluginManager.php in Drupal 9
File
core/modules/views/src/Plugin/ViewsPluginManager.php
View source
<?php
namespace Drupal\views\Plugin;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Symfony\Component\DependencyInjection\Container;
class ViewsPluginManager extends DefaultPluginManager {
public function __construct($type, \Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
$plugin_definition_annotation_name = 'Drupal\\views\\Annotation\\Views' . Container::camelize($type);
parent::__construct("Plugin/views/{$type}", $namespaces, $module_handler, 'Drupal\\views\\Plugin\\views\\ViewsPluginInterface', $plugin_definition_annotation_name);
$this->defaults += [
'parent' => 'parent',
'plugin_type' => $type,
'register_theme' => TRUE,
];
$this
->alterInfo('views_plugins_' . $type);
$this
->setCacheBackend($cache_backend, "views:{$type}");
}
}