1 | <?php |
||
24 | class FormObjectProxy |
||
25 | { |
||
26 | /** |
||
27 | * @var FormObject |
||
28 | */ |
||
29 | protected $formObject; |
||
30 | |||
31 | /** |
||
32 | * @var FormInterface |
||
33 | */ |
||
34 | protected $form; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $formHash; |
||
40 | |||
41 | /** |
||
42 | * @var bool |
||
43 | */ |
||
44 | protected $formWasSubmitted = false; |
||
45 | |||
46 | /** |
||
47 | * @var bool |
||
48 | */ |
||
49 | protected $formWasValidated = false; |
||
50 | /** |
||
51 | * @var FormResult |
||
52 | */ |
||
53 | protected $formResult; |
||
54 | |||
55 | /** |
||
56 | * @var FormObjectRequestData |
||
57 | */ |
||
58 | protected $requestData; |
||
59 | |||
60 | /** |
||
61 | * @var FormObjectMetadata |
||
62 | */ |
||
63 | protected $metadata; |
||
64 | |||
65 | /** |
||
66 | * @var bool |
||
67 | */ |
||
68 | protected $formIsPersistent = false; |
||
69 | |||
70 | /** |
||
71 | * @param FormObject $formObject |
||
72 | * @param FormInterface $form |
||
73 | */ |
||
74 | public function __construct(FormObject $formObject, FormInterface $form) |
||
79 | |||
80 | /** |
||
81 | * @return FormInterface |
||
82 | */ |
||
83 | public function getForm() |
||
87 | |||
88 | /** |
||
89 | * Will mark the form as submitted (change the result returned by the |
||
90 | * function `formWasSubmitted()`). |
||
91 | * |
||
92 | * @internal |
||
93 | */ |
||
94 | public function markFormAsSubmitted() |
||
98 | |||
99 | /** |
||
100 | * Returns `true` if the form was submitted by the user. |
||
101 | * |
||
102 | * @return bool |
||
103 | */ |
||
104 | public function formWasSubmitted() |
||
108 | |||
109 | /** |
||
110 | * Marks the form as validated. |
||
111 | * |
||
112 | * @internal |
||
113 | */ |
||
114 | public function markFormAsValidated() |
||
118 | |||
119 | /** |
||
120 | * @return bool |
||
121 | */ |
||
122 | public function formWasValidated() |
||
126 | |||
127 | /** |
||
128 | * @internal |
||
129 | */ |
||
130 | public function markFormAsPersistent() |
||
134 | |||
135 | /** |
||
136 | * @return bool |
||
137 | */ |
||
138 | public function formIsPersistent() |
||
142 | |||
143 | /** |
||
144 | * @return FormResult |
||
145 | */ |
||
146 | public function getFormResult() |
||
154 | |||
155 | /** |
||
156 | * @return FormObjectRequestData |
||
157 | */ |
||
158 | public function getRequestData() |
||
162 | |||
163 | /** |
||
164 | * @return FormMetadata |
||
165 | */ |
||
166 | public function getFormMetadata() |
||
174 | |||
175 | /** |
||
176 | * @return string |
||
177 | */ |
||
178 | public function getFormHash() |
||
186 | |||
187 | /** |
||
188 | * @param string $hash |
||
189 | */ |
||
190 | public function setFormHash($hash) |
||
194 | |||
195 | /** |
||
196 | * @param FormObjectRequestData $requestData |
||
197 | */ |
||
198 | public function injectRequestData(FormObjectRequestData $requestData) |
||
202 | } |
||
203 |