1 | <?php |
||
33 | class FormObject |
||
34 | { |
||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $name; |
||
39 | |||
40 | /** |
||
41 | * @var FormObjectStatic |
||
42 | */ |
||
43 | protected $static; |
||
44 | |||
45 | /** |
||
46 | * @var FormObjectProxy |
||
47 | */ |
||
48 | protected $proxy; |
||
49 | |||
50 | /** |
||
51 | * @var FormObjectFactory |
||
52 | */ |
||
53 | protected $formObjectFactory; |
||
54 | |||
55 | /** |
||
56 | * @var PersistenceManager |
||
57 | */ |
||
58 | protected $persistenceManager; |
||
59 | |||
60 | /** |
||
61 | * You should never create a new instance of this class directly, use the |
||
62 | * `FormObjectFactory->getInstanceFromClassName()` function instead. |
||
63 | * |
||
64 | * @param string $name |
||
65 | * @param FormObjectStatic $static |
||
66 | */ |
||
67 | public function __construct($name, FormObjectStatic $static) |
||
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | public function getName() |
||
82 | |||
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getClassName() |
||
90 | |||
91 | /** |
||
92 | * @param string $name |
||
93 | * @return bool |
||
94 | */ |
||
95 | public function hasProperty($name) |
||
99 | |||
100 | /** |
||
101 | * @return Form |
||
102 | */ |
||
103 | public function getConfiguration() |
||
107 | |||
108 | /** |
||
109 | * @return Result |
||
110 | */ |
||
111 | public function getConfigurationValidationResult() |
||
115 | |||
116 | /** |
||
117 | * @return FormInterface |
||
118 | */ |
||
119 | public function getForm() |
||
123 | |||
124 | /** |
||
125 | * @return bool |
||
126 | */ |
||
127 | public function hasForm() |
||
131 | |||
132 | /** |
||
133 | * @param FormInterface $form |
||
134 | * @throws DuplicateEntryException |
||
135 | */ |
||
136 | public function setForm(FormInterface $form) |
||
144 | |||
145 | /** |
||
146 | * @return bool |
||
147 | */ |
||
148 | public function formWasSubmitted() |
||
152 | |||
153 | /** |
||
154 | * @return bool |
||
155 | */ |
||
156 | public function formWasValidated() |
||
160 | |||
161 | /** |
||
162 | * @return FormResult |
||
163 | */ |
||
164 | public function getFormResult() |
||
168 | |||
169 | /** |
||
170 | * @return FormObjectRequestData |
||
171 | */ |
||
172 | public function getRequestData() |
||
176 | |||
177 | /** |
||
178 | * @return FormMetadata |
||
179 | */ |
||
180 | public function getFormMetadata() |
||
184 | |||
185 | /** |
||
186 | * @return string |
||
187 | */ |
||
188 | public function getFormHash() |
||
192 | |||
193 | /** |
||
194 | * @return string |
||
195 | */ |
||
196 | public function getObjectHash() |
||
200 | |||
201 | /** |
||
202 | * @return PersistenceManager |
||
203 | */ |
||
204 | public function getPersistenceManager() |
||
208 | |||
209 | /** |
||
210 | * This function will search among the registered steps to find the one that |
||
211 | * has the same controller parameters. |
||
212 | * |
||
213 | * It is also possible not to find any step, in this case `null` is |
||
214 | * returned. |
||
215 | * |
||
216 | * @param Request $request |
||
217 | * @return StepItem|null |
||
218 | */ |
||
219 | public function getCurrentStep(Request $request) |
||
255 | |||
256 | /** |
||
257 | * @return FormObjectProxy |
||
258 | * @throws PropertyNotAccessibleException |
||
259 | */ |
||
260 | protected function getProxy() |
||
268 | |||
269 | /** |
||
270 | * Wrapper for unit tests. |
||
271 | * |
||
272 | * @param FormInterface $form |
||
273 | * @return FormObjectProxy |
||
274 | */ |
||
275 | protected function createProxy(FormInterface $form) |
||
279 | |||
280 | /** |
||
281 | * @param FormObjectFactory $formObjectFactory |
||
282 | */ |
||
283 | public function injectFormObjectFactory(FormObjectFactory $formObjectFactory) |
||
287 | } |
||
288 |