1 | <?php |
||
22 | abstract class InterfacePluginBase extends AbstractInterfaceType implements TypeSystemPluginInterface { |
||
23 | use PluginTrait; |
||
24 | use CacheablePluginTrait; |
||
25 | use NamedPluginTrait; |
||
26 | use FieldablePluginTrait; |
||
27 | |||
28 | /** |
||
29 | * The list of types that implement this interface. |
||
30 | * |
||
31 | * @var \Youshido\GraphQL\Type\Object\AbstractObjectType[] |
||
32 | */ |
||
33 | protected $types = []; |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function __construct(array $configuration, $pluginId, $pluginDefinition) { |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function buildConfig(PluggableSchemaManagerInterface $schemaManager) { |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function build($config) { |
||
59 | |||
60 | /** |
||
61 | * Builds the list of types that are contained within this union type. |
||
62 | * |
||
63 | * @param \Drupal\graphql\Plugin\GraphQL\Types\TypePluginBase $type |
||
64 | * The name of this plugin. |
||
65 | */ |
||
66 | public function addType(TypePluginBase $type) { |
||
69 | |||
70 | /** |
||
71 | * Default implementation of "resolveType". |
||
72 | * |
||
73 | * Checks all implementing types and returns the matching type with the |
||
74 | * highest weight. |
||
75 | * |
||
76 | * @param mixed $object |
||
77 | * The current response tree value. |
||
78 | * |
||
79 | * @return \Youshido\GraphQL\Type\Object\AbstractObjectType|null |
||
80 | * The type object. |
||
81 | */ |
||
82 | public function resolveType($object) { |
||
91 | |||
92 | } |
||
93 |