1
|
|
|
<?php |
2
|
|
|
/******************************************************************************* |
3
|
|
|
* This file is part of the GraphQL Bundle package. |
4
|
|
|
* |
5
|
|
|
* (c) YnloUltratech <[email protected]> |
6
|
|
|
* |
7
|
|
|
* For the full copyright and license information, please view the LICENSE |
8
|
|
|
* file that was distributed with this source code. |
9
|
|
|
******************************************************************************/ |
10
|
|
|
|
11
|
|
|
namespace Ynlo\GraphQLBundle\Extension; |
12
|
|
|
|
13
|
|
|
use Doctrine\ORM\QueryBuilder; |
14
|
|
|
use Symfony\Component\Form\FormEvent; |
15
|
|
|
use Ynlo\GraphQLBundle\Model\NodeInterface; |
16
|
|
|
use Ynlo\GraphQLBundle\Resolver\ResolverContext; |
17
|
|
|
use Ynlo\GraphQLBundle\Validator\ConstraintViolationList; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Base extension for all GraphQL extensions |
21
|
|
|
*/ |
22
|
|
|
abstract class AbstractExtension implements ExtensionInterface |
23
|
|
|
{ |
24
|
|
|
/** |
25
|
|
|
* {@inheritdoc} |
26
|
|
|
*/ |
27
|
|
|
public function configureQuery(QueryBuilder $queryBuilder, $resolver, ResolverContext $context) |
28
|
|
|
{ |
29
|
|
|
// TODO: Implement configureQuery() method. |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
*{@inheritDoc} |
34
|
|
|
*/ |
35
|
|
|
public function preSetData(FormEvent $event) |
36
|
|
|
{ |
37
|
|
|
// TODO: Implement preSetData() method. |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
*{@inheritDoc} |
42
|
|
|
*/ |
43
|
|
|
public function postSetData(FormEvent $event) |
44
|
|
|
{ |
45
|
|
|
// TODO: Implement postSetData() method. |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
*{@inheritDoc} |
50
|
|
|
*/ |
51
|
|
|
public function preSubmit(FormEvent $event) |
52
|
|
|
{ |
53
|
|
|
// TODO: Implement preSubmit() method. |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
*{@inheritDoc} |
58
|
|
|
*/ |
59
|
|
|
public function onSubmit(FormEvent $event) |
60
|
|
|
{ |
61
|
|
|
// TODO: Implement onSubmit() method. |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
*{@inheritDoc} |
66
|
|
|
*/ |
67
|
|
|
public function postSubmit(FormEvent $event) |
68
|
|
|
{ |
69
|
|
|
// TODO: Implement postSubmit() method. |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* {@inheritdoc} |
74
|
|
|
*/ |
75
|
|
|
public function preValidate(&$data, $resolver, ResolverContext $context) |
|
|
|
|
76
|
|
|
{ |
77
|
|
|
// TODO: Implement preValidate() method. |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* {@inheritdoc} |
82
|
|
|
*/ |
83
|
|
|
public function postValidation($data, ConstraintViolationList $violations, $resolver, ResolverContext $context) |
|
|
|
|
84
|
|
|
{ |
85
|
|
|
// TODO: Implement postValidation() method. |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* {@inheritdoc} |
90
|
|
|
*/ |
91
|
|
|
public function prePersist(NodeInterface $node, $resolver, ResolverContext $context) |
92
|
|
|
{ |
93
|
|
|
// TODO: Implement prePersist() method. |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* {@inheritdoc} |
98
|
|
|
*/ |
99
|
|
|
public function postPersist(NodeInterface $node, $resolver, ResolverContext $context) |
100
|
|
|
{ |
101
|
|
|
// TODO: Implement postPersist() method. |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* {@inheritdoc} |
106
|
|
|
*/ |
107
|
|
|
public function preUpdate(NodeInterface $node, $resolver, ResolverContext $context) |
108
|
|
|
{ |
109
|
|
|
// TODO: Implement preUpdate() method. |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* {@inheritdoc} |
114
|
|
|
*/ |
115
|
|
|
public function postUpdate(NodeInterface $node, $resolver, ResolverContext $context) |
116
|
|
|
{ |
117
|
|
|
// TODO: Implement postUpdate() method. |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* {@inheritdoc} |
122
|
|
|
*/ |
123
|
|
|
public function preDelete(NodeInterface $node, $resolver, ResolverContext $context) |
124
|
|
|
{ |
125
|
|
|
// TODO: Implement preDelete() method. |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* {@inheritdoc} |
130
|
|
|
*/ |
131
|
|
|
public function postDelete(NodeInterface $node, $resolver, ResolverContext $context) |
132
|
|
|
{ |
133
|
|
|
// TODO: Implement postDelete() method. |
134
|
|
|
} |
135
|
|
|
} |
136
|
|
|
|
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.