1 | <?php |
||
35 | class FormObject |
||
36 | { |
||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $name; |
||
41 | |||
42 | /** |
||
43 | * @var FormObjectStatic |
||
44 | */ |
||
45 | protected $static; |
||
46 | |||
47 | /** |
||
48 | * @var FormObjectProxy |
||
49 | */ |
||
50 | protected $proxy; |
||
51 | |||
52 | /** |
||
53 | * @var PersistenceManager |
||
54 | */ |
||
55 | protected $persistenceManager; |
||
56 | |||
57 | /** |
||
58 | * You should never create a new instance of this class directly, use the |
||
59 | * `FormObjectFactory->getInstanceFromClassName()` function instead. |
||
60 | * |
||
61 | * @param string $name |
||
62 | * @param FormObjectStatic $static |
||
63 | */ |
||
64 | public function __construct($name, FormObjectStatic $static) |
||
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getName() |
||
79 | |||
80 | /** |
||
81 | * @return string |
||
82 | */ |
||
83 | public function getClassName() |
||
87 | |||
88 | /** |
||
89 | * @return FormDefinition |
||
90 | */ |
||
91 | public function getDefinition() |
||
92 | { |
||
93 | return $this->static->getDefinition(); |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * @return Result |
||
98 | */ |
||
99 | public function getDefinitionValidationResult() |
||
100 | { |
||
101 | return $this->static->getDefinitionValidationResult(); |
||
102 | } |
||
103 | |||
104 | /** |
||
105 | * @return FormInterface |
||
106 | */ |
||
107 | public function getForm() |
||
111 | |||
112 | /** |
||
113 | * @return bool |
||
114 | */ |
||
115 | public function hasForm() |
||
119 | |||
120 | /** |
||
121 | * @param FormInterface $form |
||
122 | * @throws DuplicateEntryException |
||
123 | */ |
||
124 | public function setForm(FormInterface $form) |
||
134 | |||
135 | /** |
||
136 | * @return bool |
||
137 | */ |
||
138 | public function formWasSubmitted() |
||
142 | |||
143 | /** |
||
144 | * @return bool |
||
145 | */ |
||
146 | public function formWasValidated() |
||
150 | |||
151 | /** |
||
152 | * @return FormResult |
||
153 | */ |
||
154 | public function getFormResult() |
||
158 | |||
159 | /** |
||
160 | * @return FormObjectRequestData |
||
161 | */ |
||
162 | public function getRequestData() |
||
166 | /** |
||
167 | * @return FormMetadata |
||
168 | */ |
||
169 | public function getFormMetadata() |
||
173 | |||
174 | /** |
||
175 | * @return string |
||
176 | */ |
||
177 | public function getFormHash() |
||
181 | |||
182 | /** |
||
183 | * @return string |
||
184 | */ |
||
185 | public function getObjectHash() |
||
189 | |||
190 | /** |
||
191 | * @return PersistenceManager |
||
192 | */ |
||
193 | public function getPersistenceManager() |
||
197 | |||
198 | /** |
||
199 | * @return bool |
||
200 | */ |
||
201 | public function hasSteps() |
||
205 | |||
206 | /** |
||
207 | * @return Step|null |
||
208 | */ |
||
209 | public function getCurrentStep() |
||
213 | |||
214 | /** |
||
215 | * @param Request $request |
||
216 | * @return $this |
||
217 | */ |
||
218 | public function fetchCurrentStep(Request $request) |
||
224 | |||
225 | /** |
||
226 | * @return SubstepDefinition |
||
227 | */ |
||
228 | public function getCurrentSubstepDefinition() |
||
233 | |||
234 | /** |
||
235 | * @param FormInterface $form |
||
236 | */ |
||
237 | protected function registerFormInstance(FormInterface $form) |
||
243 | |||
244 | /** |
||
245 | * @return FormObjectProxy |
||
246 | * @throws PropertyNotAccessibleException |
||
247 | */ |
||
248 | protected function getProxy() |
||
256 | |||
257 | /** |
||
258 | * Wrapper for unit tests. |
||
259 | * |
||
260 | * @param FormInterface $form |
||
261 | * @return FormObjectProxy |
||
262 | */ |
||
263 | protected function createProxy(FormInterface $form) |
||
267 | } |
||
268 |