You are here

public function TypePluginManager::__construct in GraphQL 8.3

TypePluginManager constructor.

Parameters

bool|string $pluginSubdirectory: The plugin's subdirectory.

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

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler.

\Drupal\Core\Cache\CacheBackendInterface $cacheBackend: The cache backend.

string|null $pluginInterface: The interface each plugin should implement.

string $pluginAnnotationName: The name of the annotation that contains the plugin definition.

string $pluginType: The plugin type.

array $config: The configuration service parameter.

Overrides DefaultPluginManager::__construct

File

src/Plugin/TypePluginManager.php, line 40

Class

TypePluginManager

Namespace

Drupal\graphql\Plugin

Code

public function __construct($pluginSubdirectory, \Traversable $namespaces, ModuleHandlerInterface $moduleHandler, CacheBackendInterface $cacheBackend, $pluginInterface, $pluginAnnotationName, $pluginType, array $config) {
  parent::__construct($pluginSubdirectory, $namespaces, $moduleHandler, $pluginInterface, $pluginAnnotationName);
  $this
    ->alterInfo("graphql_{$pluginType}");
  $this
    ->useCaches(empty($config['development']));
  $this
    ->setCacheBackend($cacheBackend, $pluginType, [
    'graphql',
  ]);
}