public function DataProducerPluginManager::__construct in GraphQL 8.4
DataProducerPluginManager 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 $definitionCacheBackend:
\Symfony\Component\HttpFoundation\RequestStack $requestStack:
\Drupal\Core\Cache\Context\CacheContextsManager $contextsManager:
\Drupal\Core\Cache\CacheBackendInterface $resultCacheBackend:
string|null $pluginInterface: The interface each plugin should implement.
string $pluginAnnotationName: The name of the annotation that contains the plugin definition.
array $config: The configuration service parameter.
Overrides DefaultPluginManager::__construct
File
- src/
Plugin/ DataProducerPluginManager.php, line 59
Class
- DataProducerPluginManager
- Collects data producer plugins that are composed to read and write data.
Namespace
Drupal\graphql\PluginCode
public function __construct($pluginSubdirectory, \Traversable $namespaces, ModuleHandlerInterface $moduleHandler, CacheBackendInterface $definitionCacheBackend, RequestStack $requestStack, CacheContextsManager $contextsManager, CacheBackendInterface $resultCacheBackend, $pluginInterface, $pluginAnnotationName, array $config) {
parent::__construct($pluginSubdirectory, $namespaces, $moduleHandler, $pluginInterface, $pluginAnnotationName);
$this
->alterInfo('graphql_data_producer');
$this
->useCaches(empty($config['development']));
$this
->setCacheBackend($definitionCacheBackend, 'graphql_data_producer', [
'graphql_data_producer',
]);
$this->requestStack = $requestStack;
$this->contextsManager = $contextsManager;
$this->resultCacheBackend = $resultCacheBackend;
}