@@ 32-47 (lines=16) @@ | ||
29 | /** |
|
30 | * {@inheritdoc} |
|
31 | */ |
|
32 | public function getDefinition(PluggableSchemaBuilderInterface $schemaBuilder) { |
|
33 | if (!isset($this->definition)) { |
|
34 | $definition = $this->getPluginDefinition(); |
|
35 | ||
36 | $this->definition = new Field($this, $schemaBuilder, [ |
|
37 | 'name' => $this->buildName(), |
|
38 | 'description' => $this->buildDescription(), |
|
39 | 'type' => $this->buildType($schemaBuilder), |
|
40 | 'args' => $this->buildArguments($schemaBuilder), |
|
41 | 'isDeprecated' => !empty($definition['deprecated']), |
|
42 | 'deprecationReason' => !empty($definition['deprecated']) ? !empty($definition['deprecated']) : '', |
|
43 | ]); |
|
44 | } |
|
45 | ||
46 | return $this->definition; |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * {@inheritdoc} |
@@ 39-56 (lines=18) @@ | ||
36 | /** |
|
37 | * {@inheritdoc} |
|
38 | */ |
|
39 | public function getDefinition(PluggableSchemaBuilderInterface $schemaBuilder) { |
|
40 | if (!isset($this->definition)) { |
|
41 | $definition = $this->getPluginDefinition(); |
|
42 | ||
43 | $config = [ |
|
44 | 'name' => $this->buildName(), |
|
45 | 'description' => $this->buildDescription(), |
|
46 | 'type' => $this->buildType($schemaBuilder), |
|
47 | 'args' => $this->buildArguments($schemaBuilder), |
|
48 | 'isDeprecated' => !empty($definition['deprecated']), |
|
49 | 'deprecationReason' => !empty($definition['deprecated']) ? !empty($definition['deprecated']) : '', |
|
50 | ]; |
|
51 | ||
52 | $this->definition = new Field($this, $schemaBuilder, $config); |
|
53 | } |
|
54 | ||
55 | return $this->definition; |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * {@inheritdoc} |