1 | <?php |
||
25 | class FormController extends ActionController |
||
26 | { |
||
27 | /** |
||
28 | * @var FormObject[] |
||
29 | */ |
||
30 | protected $formArguments = []; |
||
31 | |||
32 | /** |
||
33 | * @var FormzControllerContext |
||
34 | */ |
||
35 | protected $formzControllerContext; |
||
36 | |||
37 | /** |
||
38 | * @var HashService |
||
39 | */ |
||
40 | protected $hashService; |
||
41 | |||
42 | /** |
||
43 | * @var FormObjectFactory |
||
44 | */ |
||
45 | protected $formObjectFactory; |
||
46 | |||
47 | /** |
||
48 | * Main action used to dispatch the request properly, depending on FormZ |
||
49 | * configuration. |
||
50 | * |
||
51 | * The request is based on the previously called controller action, and is |
||
52 | * used to list which forms are handled (every argument of the action method |
||
53 | * that implements the interface `FormInterface`). |
||
54 | * |
||
55 | * Middlewares will be called for each form argument, and may modify the |
||
56 | * request, which is then dispatched again with modified data. |
||
57 | */ |
||
58 | public function processFormAction() |
||
90 | |||
91 | /** |
||
92 | * Will fetch every form argument for this request, and dispatch every |
||
93 | * middleware that was registered in its TypoScript configuration. |
||
94 | */ |
||
95 | protected function invokeMiddlewares() |
||
113 | |||
114 | /** |
||
115 | * Loops on the request arguments, and pick up each one that is a form |
||
116 | * instance (it implements `FormInterface`). |
||
117 | * |
||
118 | * @return FormObject[] |
||
119 | */ |
||
120 | protected function getRequestForms() |
||
141 | |||
142 | /** |
||
143 | * @todo |
||
144 | * |
||
145 | * @return array |
||
146 | */ |
||
147 | protected function getRequestData() |
||
159 | |||
160 | /** |
||
161 | * @param FormzControllerContext $formzControllerContext |
||
162 | */ |
||
163 | public function injectFormzControllerContext(FormzControllerContext $formzControllerContext) |
||
167 | |||
168 | /** |
||
169 | * @param HashService $hashService |
||
170 | */ |
||
171 | public function injectHashService(HashService $hashService) |
||
175 | |||
176 | /** |
||
177 | * @param FormObjectFactory $formObjectFactory |
||
178 | */ |
||
179 | public function injectFormObjectFactory(FormObjectFactory $formObjectFactory) |
||
183 | } |
||
184 |