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

ConfigEntityProperty::resolveValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Drupal\graphql_core\Plugin\GraphQL\Fields\Entity\Config;
4
5
use Drupal\graphql_core\Plugin\GraphQL\Fields\EntityFieldBase;
6
use Youshido\GraphQL\Execution\ResolveInfo;
7
8
/**
9
 * @GraphQLField(
10
 *   id = "config_entity_property",
11
 *   secure = true,
12
 *   nullable = true,
13
 *   weight = -2,
14
 *   deriver = "Drupal\graphql_core\Plugin\Deriver\Fields\ConfigEntityPropertyDeriver",
15
 * )
16
 */
17
class ConfigEntityProperty extends EntityFieldBase {
0 ignored issues
show
Bug introduced by
There is one abstract method getPluginDefinition in this class; you could implement it, or declare this class as abstract.
Loading history...
18
19
  /**
20
   * {@inheritdoc}
21
   */
22
  public function resolveValues($value, array $args, ResolveInfo $info) {
23
    $definition = $this->getPluginDefinition();
24
    $property = $definition['property'];
25
    yield $value->get($property);
26
  }
27
28
}
29