-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathInterfaceTypeDefinition.php
More file actions
37 lines (29 loc) · 1.01 KB
/
InterfaceTypeDefinition.php
File metadata and controls
37 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\Config;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
class InterfaceTypeDefinition extends TypeWithOutputFieldsDefinition
{
public const CONFIG_NAME = '_interface_config';
public static function getName(): string
{
return static::CONFIG_NAME;
}
public function getDefinition(): ArrayNodeDefinition
{
/** @var ArrayNodeDefinition $node */
$node = self::createNode(static::CONFIG_NAME);
/** @phpstan-ignore-next-line */
$node
->children()
->append($this->nameSection())
->append($this->outputFieldsSection())
->append($this->resolveTypeSection())
->append($this->descriptionSection())
->arrayNode('interfaces')
->prototype('scalar')->info('One of internal or custom interface types.')->end()
->end()
->end();
return $node;
}
}