1 | <?php |
||
29 | class FormObjectProxy |
||
30 | { |
||
31 | /** |
||
32 | * @var FormObject |
||
33 | */ |
||
34 | protected $formObject; |
||
35 | |||
36 | /** |
||
37 | * @var FormInterface |
||
38 | */ |
||
39 | protected $form; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $formHash; |
||
45 | |||
46 | /** |
||
47 | * @var bool |
||
48 | */ |
||
49 | protected $formWasSubmitted = false; |
||
50 | |||
51 | /** |
||
52 | * @var bool |
||
53 | */ |
||
54 | protected $formWasValidated = false; |
||
55 | |||
56 | /** |
||
57 | * @var FormResult |
||
58 | */ |
||
59 | protected $formResult; |
||
60 | |||
61 | /** |
||
62 | * @var FormObjectRequestData |
||
63 | */ |
||
64 | protected $requestData; |
||
65 | |||
66 | /** |
||
67 | * @var FormObjectMetadata |
||
68 | */ |
||
69 | protected $metadata; |
||
70 | |||
71 | /** |
||
72 | * @var FormObjectSteps |
||
73 | */ |
||
74 | protected $stepService; |
||
75 | |||
76 | /** |
||
77 | * @param FormObject $formObject |
||
78 | * @param FormInterface $form |
||
79 | */ |
||
80 | public function __construct(FormObject $formObject, FormInterface $form) |
||
86 | |||
87 | /** |
||
88 | * @return FormInterface |
||
89 | */ |
||
90 | public function getForm() |
||
94 | |||
95 | /** |
||
96 | * Will mark the form as submitted (change the result returned by the |
||
97 | * function `formWasSubmitted()`). |
||
98 | */ |
||
99 | public function markFormAsSubmitted() |
||
103 | |||
104 | /** |
||
105 | * Returns `true` if the form was submitted by the user. |
||
106 | * |
||
107 | * @return bool |
||
108 | */ |
||
109 | public function formWasSubmitted() |
||
113 | |||
114 | /** |
||
115 | * Marks the form as validated. |
||
116 | */ |
||
117 | public function markFormAsValidated() |
||
121 | |||
122 | /** |
||
123 | * @return bool |
||
124 | */ |
||
125 | public function formWasValidated() |
||
129 | |||
130 | /** |
||
131 | * @return FormResult |
||
132 | */ |
||
133 | public function getFormResult() |
||
141 | |||
142 | /** |
||
143 | * @return FormObjectRequestData |
||
144 | */ |
||
145 | public function getRequestData() |
||
149 | |||
150 | /** |
||
151 | * @return FormMetadata |
||
152 | */ |
||
153 | public function getFormMetadata() |
||
162 | |||
163 | /** |
||
164 | * @param Request $request |
||
165 | * @return Step|null |
||
166 | */ |
||
167 | public function getCurrentStep(Request $request) |
||
171 | |||
172 | /** |
||
173 | * @return Substep|null |
||
174 | */ |
||
175 | public function getCurrentSubstep() |
||
179 | |||
180 | /** |
||
181 | * @return FormStepPersistence |
||
182 | */ |
||
183 | public function getStepPersistence() |
||
187 | |||
188 | /** |
||
189 | * @return string |
||
190 | */ |
||
191 | public function getFormHash() |
||
199 | |||
200 | /** |
||
201 | * @param string $hash |
||
202 | */ |
||
203 | public function setFormHash($hash) |
||
207 | |||
208 | /** |
||
209 | * @param FormObjectRequestData $requestData |
||
210 | */ |
||
211 | public function injectRequestData(FormObjectRequestData $requestData) |
||
215 | } |
||
216 |