1 | <?php |
||
16 | class Field extends AbstractField implements SecureFieldInterface, TypeSystemPluginReferenceInterface, CacheableEdgeInterface { |
||
17 | use TypeSystemPluginReferenceTrait; |
||
18 | use CacheableEdgeTrait; |
||
19 | |||
20 | /** |
||
21 | * Indicates if the field is considered secure. |
||
22 | * |
||
23 | * @var bool |
||
24 | */ |
||
25 | protected $secure; |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function __construct(TypeSystemPluginInterface $plugin, $secure, array $config = []) { |
||
31 | $this->plugin = $plugin; |
||
32 | $this->secure = $secure; |
||
33 | $this->config = new FieldConfig($config, $this, TRUE); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function resolve($value, array $args, ResolveInfo $info) { |
||
40 | if (($plugin = $this->getPluginFromResolveInfo($info)) && $plugin instanceof FieldPluginBase) { |
||
41 | return $plugin->resolve($value, $args, $info); |
||
42 | } |
||
43 | |||
44 | return NULL; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function getType() { |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function getName() { |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function isSecure() { |
||
67 | } |
||
68 |