1 | <?php |
||
28 | class FormObjectProxy |
||
29 | { |
||
30 | /** |
||
31 | * @var FormObject |
||
32 | */ |
||
33 | protected $formObject; |
||
34 | |||
35 | /** |
||
36 | * @var FormInterface |
||
37 | */ |
||
38 | protected $form; |
||
39 | |||
40 | /** |
||
41 | * @var FormObjectRequestData |
||
42 | */ |
||
43 | protected $requestData; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $formHash; |
||
49 | |||
50 | /** |
||
51 | * @var bool |
||
52 | */ |
||
53 | protected $formWasSubmitted = false; |
||
54 | |||
55 | /** |
||
56 | * @var bool |
||
57 | */ |
||
58 | protected $formWasValidated = false; |
||
59 | |||
60 | /** |
||
61 | * @var FormResult |
||
62 | */ |
||
63 | protected $formResult; |
||
64 | |||
65 | /** |
||
66 | * @var FormObjectMetadata |
||
67 | */ |
||
68 | protected $metadata; |
||
69 | |||
70 | /** |
||
71 | * @var FormObjectSteps |
||
72 | */ |
||
73 | protected $stepService; |
||
74 | |||
75 | /** |
||
76 | * @param FormObject $formObject |
||
77 | * @param FormInterface $form |
||
78 | */ |
||
79 | public function __construct(FormObject $formObject, FormInterface $form) |
||
85 | |||
86 | /** |
||
87 | * @return FormObjectRequestData |
||
88 | */ |
||
89 | public function getRequestData() |
||
93 | |||
94 | /** |
||
95 | * @return FormInterface |
||
96 | */ |
||
97 | public function getForm() |
||
101 | |||
102 | /** |
||
103 | * Will mark the form as submitted (change the result returned by the |
||
104 | * function `formWasSubmitted()`). |
||
105 | */ |
||
106 | public function markFormAsSubmitted() |
||
110 | |||
111 | /** |
||
112 | * Returns `true` if the form was submitted by the user. |
||
113 | * |
||
114 | * @return bool |
||
115 | */ |
||
116 | public function formWasSubmitted() |
||
120 | |||
121 | /** |
||
122 | * Marks the form as validated. |
||
123 | */ |
||
124 | public function markFormAsValidated() |
||
128 | |||
129 | /** |
||
130 | * @return bool |
||
131 | */ |
||
132 | public function formWasValidated() |
||
136 | |||
137 | /** |
||
138 | * @return FormResult |
||
139 | */ |
||
140 | public function getFormResult() |
||
148 | |||
149 | /** |
||
150 | * @return FormMetadata |
||
151 | */ |
||
152 | public function getFormMetadata() |
||
161 | |||
162 | /** |
||
163 | * @param Request $request |
||
164 | * @return Step|null |
||
165 | */ |
||
166 | public function getCurrentStep(Request $request) |
||
170 | |||
171 | /** |
||
172 | * @return FormStepPersistence |
||
173 | */ |
||
174 | public function getStepPersistence() |
||
178 | |||
179 | /** |
||
180 | * @return string |
||
181 | */ |
||
182 | public function getFormHash() |
||
190 | |||
191 | /** |
||
192 | * @param string $hash |
||
193 | */ |
||
194 | public function setFormHash($hash) |
||
198 | |||
199 | /** |
||
200 | * @param FormObjectRequestData $requestData |
||
201 | */ |
||
202 | public function injectRequestData(FormObjectRequestData $requestData) |
||
206 | } |
||
207 |