1 | <?php |
||
20 | abstract class FormSubmissionField |
||
21 | { |
||
22 | /** |
||
23 | * This id of this FormSubmissionField |
||
24 | * |
||
25 | * @ORM\Id |
||
26 | * @ORM\Column(type="bigint") |
||
27 | * @ORM\GeneratedValue(strategy="AUTO") |
||
28 | */ |
||
29 | protected $id; |
||
30 | |||
31 | /** |
||
32 | * The name of this FormSubmissionField |
||
33 | * |
||
34 | * @ORM\Column(type="string") |
||
35 | */ |
||
36 | protected $fieldName; |
||
37 | |||
38 | /** |
||
39 | * The label used for this FormSubmissionField |
||
40 | * |
||
41 | * @ORM\Column(type="string") |
||
42 | */ |
||
43 | protected $label; |
||
44 | |||
45 | /** |
||
46 | * The FormSubmission this field is part of |
||
47 | * |
||
48 | * @ORM\ManyToOne(targetEntity="FormSubmission", inversedBy="fields") |
||
49 | * @ORM\JoinColumn(name="form_submission_id", referencedColumnName="id") |
||
50 | */ |
||
51 | protected $formSubmission; |
||
52 | |||
53 | /** |
||
54 | * @ORM\Column(type="integer", nullable=true) |
||
55 | */ |
||
56 | protected $sequence; |
||
57 | |||
58 | /** |
||
59 | * The internal name of the form pagepart attached to this. |
||
60 | * |
||
61 | * @ORM\Column(name="internal_name", type="string", nullable=true) |
||
62 | */ |
||
63 | protected $internalName; |
||
64 | |||
65 | /** |
||
66 | * Get id |
||
67 | * |
||
68 | * @return integer |
||
|
|||
69 | */ |
||
70 | public function getId() |
||
74 | |||
75 | /** |
||
76 | * Set id |
||
77 | * |
||
78 | * @param string $id |
||
79 | * |
||
80 | * @return FormSubmissionField |
||
81 | */ |
||
82 | public function setId($id) |
||
88 | |||
89 | /** |
||
90 | * Get the field name |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getFieldName() |
||
98 | |||
99 | /** |
||
100 | * Set the field name |
||
101 | * |
||
102 | * @param string $fieldName |
||
103 | * |
||
104 | * @return FormSubmissionField |
||
105 | */ |
||
106 | public function setFieldName($fieldName) |
||
112 | |||
113 | /** |
||
114 | * Get the label |
||
115 | * |
||
116 | * @return string |
||
117 | */ |
||
118 | public function getLabel() |
||
122 | |||
123 | /** |
||
124 | * Set the label |
||
125 | * |
||
126 | * @param string $label |
||
127 | * |
||
128 | * @return FormSubmissionField |
||
129 | */ |
||
130 | public function setLabel($label) |
||
136 | |||
137 | /** |
||
138 | * Get the FormSubmission this field is part of |
||
139 | * |
||
140 | * @return FormSubmission |
||
141 | */ |
||
142 | public function getSubmission() |
||
146 | |||
147 | /** |
||
148 | * Set the FormSubmission this field is part of |
||
149 | * |
||
150 | * @param FormSubmission $formSubmission |
||
151 | * |
||
152 | * @return FormSubmissionField |
||
153 | */ |
||
154 | public function setSubmission(FormSubmission $formSubmission) |
||
160 | |||
161 | /** |
||
162 | * Get sequence |
||
163 | * |
||
164 | * @return integer |
||
165 | */ |
||
166 | public function getSequence() |
||
170 | |||
171 | /** |
||
172 | * Set sequence |
||
173 | * |
||
174 | * @param string $sequence |
||
175 | * |
||
176 | * @return FormSubmissionField |
||
177 | */ |
||
178 | public function setSequence($sequence) |
||
184 | |||
185 | /** |
||
186 | * @return mixed |
||
187 | */ |
||
188 | public function getFormSubmission() |
||
192 | |||
193 | /** |
||
194 | * @param mixed $formSubmission |
||
195 | */ |
||
196 | public function setFormSubmission($formSubmission) |
||
200 | |||
201 | /** |
||
202 | * @return mixed |
||
203 | */ |
||
204 | public function getInternalName() |
||
208 | |||
209 | /** |
||
210 | * @param mixed $internalName |
||
211 | */ |
||
212 | public function setInternalName($internalName) |
||
216 | |||
217 | /** |
||
218 | * Text representation of this field |
||
219 | * |
||
220 | * @return string |
||
221 | */ |
||
222 | public function __toString() |
||
226 | |||
227 | /** |
||
228 | * This function will be triggered if the form was successfully posted. |
||
229 | * |
||
230 | * @param Form $form the Form |
||
231 | * @param FormBuilderInterface $formBuilder the FormBuilder |
||
232 | * @param Request $request the Request |
||
233 | * @param ContainerInterface $container the Container |
||
234 | */ |
||
235 | public function onValidPost(Form $form, FormBuilderInterface $formBuilder, Request $request, ContainerInterface $container) |
||
239 | } |
||
240 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.