Completed
Pull Request — 8.x-3.x (#401)
by Sebastian
02:29
created

TypeSystemPluginManager::createInstance()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 19
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 11
nc 4
nop 2
dl 0
loc 19
rs 9.2
c 0
b 0
f 0
1
<?php
2
3
namespace Drupal\graphql\Plugin\GraphQL;
4
5
use Drupal\Core\Extension\ModuleHandlerInterface;
6
use Drupal\Core\Plugin\DefaultPluginManager;
7
use Traversable;
8
9
/**
10
 * Base class for type system plugin managers or all sorts.
11
 */
12
class TypeSystemPluginManager extends DefaultPluginManager {
13
14
  /**
15
   * {@inheritdoc}
16
   */
17
  public function __construct(
18
    $pluginSubdirectory,
19
    Traversable $namespaces,
20
    ModuleHandlerInterface $moduleHandler,
21
    $pluginInterface,
22
    $pluginAnnotationName,
23
    $pluginType
24
  ) {
25
    // Allow altering plugin definitions through a hook.
26
    $this->alterInfo($pluginType);
27
28
    parent::__construct(
29
      $pluginSubdirectory,
30
      $namespaces,
31
      $moduleHandler,
32
      $pluginInterface,
33
      $pluginAnnotationName
34
    );
35
  }
36
37
}
38