| @@ 9-49 (lines=41) @@ | ||
| 6 | use Drupal\Core\Extension\ModuleHandlerInterface; |
|
| 7 | use Drupal\Core\Plugin\DefaultPluginManager; |
|
| 8 | ||
| 9 | class FieldPluginManager extends DefaultPluginManager { |
|
| 10 | ||
| 11 | /** |
|
| 12 | * FieldPluginManager constructor. |
|
| 13 | * |
|
| 14 | * @param bool|string $pluginSubdirectory |
|
| 15 | * The plugin's subdirectory. |
|
| 16 | * @param \Traversable $namespaces |
|
| 17 | * An object that implements \Traversable which contains the root paths |
|
| 18 | * keyed by the corresponding namespace to look for plugin implementations. |
|
| 19 | * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler |
|
| 20 | * The module handler. |
|
| 21 | * @param \Drupal\Core\Cache\CacheBackendInterface $cacheBackend |
|
| 22 | * The cache backend. |
|
| 23 | * @param string|null $pluginInterface |
|
| 24 | * The interface each plugin should implement. |
|
| 25 | * @param string $pluginAnnotationName |
|
| 26 | * The name of the annotation that contains the plugin definition. |
|
| 27 | */ |
|
| 28 | public function __construct( |
|
| 29 | $pluginSubdirectory, |
|
| 30 | \Traversable $namespaces, |
|
| 31 | ModuleHandlerInterface $moduleHandler, |
|
| 32 | CacheBackendInterface $cacheBackend, |
|
| 33 | $pluginInterface, |
|
| 34 | $pluginAnnotationName |
|
| 35 | ) { |
|
| 36 | parent::__construct( |
|
| 37 | $pluginSubdirectory, |
|
| 38 | $namespaces, |
|
| 39 | $moduleHandler, |
|
| 40 | $pluginInterface, |
|
| 41 | $pluginAnnotationName |
|
| 42 | ); |
|
| 43 | ||
| 44 | $this->alterInfo('graphql_fields'); |
|
| 45 | $this->useCaches(TRUE); |
|
| 46 | $this->setCacheBackend($cacheBackend, 'fields', ['graphql', 'graphql:fields']); |
|
| 47 | } |
|
| 48 | ||
| 49 | } |
|
| 50 | ||
| @@ 9-49 (lines=41) @@ | ||
| 6 | use Drupal\Core\Extension\ModuleHandlerInterface; |
|
| 7 | use Drupal\Core\Plugin\DefaultPluginManager; |
|
| 8 | ||
| 9 | class MutationPluginManager extends DefaultPluginManager { |
|
| 10 | ||
| 11 | /** |
|
| 12 | * FieldPluginManager constructor. |
|
| 13 | * |
|
| 14 | * @param bool|string $pluginSubdirectory |
|
| 15 | * The plugin's subdirectory. |
|
| 16 | * @param \Traversable $namespaces |
|
| 17 | * An object that implements \Traversable which contains the root paths |
|
| 18 | * keyed by the corresponding namespace to look for plugin implementations. |
|
| 19 | * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler |
|
| 20 | * The module handler. |
|
| 21 | * @param \Drupal\Core\Cache\CacheBackendInterface $cacheBackend |
|
| 22 | * The cache backend. |
|
| 23 | * @param string|null $pluginInterface |
|
| 24 | * The interface each plugin should implement. |
|
| 25 | * @param string $pluginAnnotationName |
|
| 26 | * The name of the annotation that contains the plugin definition. |
|
| 27 | */ |
|
| 28 | public function __construct( |
|
| 29 | $pluginSubdirectory, |
|
| 30 | \Traversable $namespaces, |
|
| 31 | ModuleHandlerInterface $moduleHandler, |
|
| 32 | CacheBackendInterface $cacheBackend, |
|
| 33 | $pluginInterface, |
|
| 34 | $pluginAnnotationName |
|
| 35 | ) { |
|
| 36 | parent::__construct( |
|
| 37 | $pluginSubdirectory, |
|
| 38 | $namespaces, |
|
| 39 | $moduleHandler, |
|
| 40 | $pluginInterface, |
|
| 41 | $pluginAnnotationName |
|
| 42 | ); |
|
| 43 | ||
| 44 | $this->alterInfo('graphql_mutations'); |
|
| 45 | $this->useCaches(TRUE); |
|
| 46 | $this->setCacheBackend($cacheBackend, 'mutations', ['graphql', 'graphql:mutations']); |
|
| 47 | } |
|
| 48 | ||
| 49 | } |
|
| 50 | ||
| @@ 9-49 (lines=41) @@ | ||
| 6 | use Drupal\Core\Extension\ModuleHandlerInterface; |
|
| 7 | use Drupal\Core\Plugin\DefaultPluginManager; |
|
| 8 | ||
| 9 | class SchemaPluginManager extends DefaultPluginManager { |
|
| 10 | ||
| 11 | /** |
|
| 12 | * SchemaPluginManager constructor. |
|
| 13 | * |
|
| 14 | * @param bool|string $pluginSubdirectory |
|
| 15 | * The plugin's subdirectory. |
|
| 16 | * @param \Traversable $namespaces |
|
| 17 | * An object that implements \Traversable which contains the root paths |
|
| 18 | * keyed by the corresponding namespace to look for plugin implementations. |
|
| 19 | * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler |
|
| 20 | * The module handler. |
|
| 21 | * @param \Drupal\Core\Cache\CacheBackendInterface $cacheBackend |
|
| 22 | * The cache backend. |
|
| 23 | * @param string|null $pluginInterface |
|
| 24 | * The interface each plugin should implement. |
|
| 25 | * @param string $pluginAnnotationName |
|
| 26 | * The name of the annotation that contains the plugin definition. |
|
| 27 | */ |
|
| 28 | public function __construct( |
|
| 29 | $pluginSubdirectory, |
|
| 30 | \Traversable $namespaces, |
|
| 31 | ModuleHandlerInterface $moduleHandler, |
|
| 32 | CacheBackendInterface $cacheBackend, |
|
| 33 | $pluginInterface, |
|
| 34 | $pluginAnnotationName |
|
| 35 | ) { |
|
| 36 | parent::__construct( |
|
| 37 | $pluginSubdirectory, |
|
| 38 | $namespaces, |
|
| 39 | $moduleHandler, |
|
| 40 | $pluginInterface, |
|
| 41 | $pluginAnnotationName |
|
| 42 | ); |
|
| 43 | ||
| 44 | $this->alterInfo('graphql_schema'); |
|
| 45 | $this->useCaches(TRUE); |
|
| 46 | $this->setCacheBackend($cacheBackend, 'schemas', ['graphql', 'graphql:schemas']); |
|
| 47 | } |
|
| 48 | ||
| 49 | } |
|
| 50 | ||