@@ 18-27 (lines=10) @@ | ||
15 | class InputFieldConfig extends Config |
|
16 | { |
|
17 | ||
18 | public function getRules() |
|
19 | { |
|
20 | return [ |
|
21 | 'name' => ['type' => TypeMap::TYPE_STRING, 'required' => true], |
|
22 | 'type' => ['type' => TypeMap::TYPE_ANY_INPUT, 'required' => true], |
|
23 | 'required' => ['type' => TypeMap::TYPE_BOOLEAN], |
|
24 | 'default' => ['type' => TypeMap::TYPE_ANY], |
|
25 | 'description' => ['type' => TypeMap::TYPE_STRING], |
|
26 | ]; |
|
27 | } |
|
28 | ||
29 | public function getDefaultValue() |
|
30 | { |
@@ 26-35 (lines=10) @@ | ||
23 | ||
24 | use FieldsAwareTrait, ArgumentsAwareTrait; |
|
25 | ||
26 | public function getRules() |
|
27 | { |
|
28 | return [ |
|
29 | 'name' => ['type' => TypeMap::TYPE_STRING, 'required' => true], |
|
30 | 'description' => ['type' => TypeMap::TYPE_STRING], |
|
31 | 'fields' => ['type' => TypeMap::TYPE_ARRAY_OF_FIELDS], |
|
32 | 'args' => ['type' => TypeMap::TYPE_ARRAY_OF_INPUTS], |
|
33 | 'resolve' => ['type' => TypeMap::TYPE_FUNCTION], |
|
34 | ]; |
|
35 | } |
|
36 | ||
37 | protected function build() |
|
38 | { |