| Total Complexity | 4 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class FormMiddleware extends AbstractMiddleware |
||
| 9 | { |
||
| 10 | public function process($form, array $context = array()) |
||
| 11 | { |
||
| 12 | /** @var FormViewFactory $factory */ |
||
| 13 | $factory = $this->container->get(FormViewFactory::class); |
||
| 14 | $form->setForm($factory->create($form)); |
||
| 15 | } |
||
| 16 | |||
| 17 | public function supportsData($data): bool |
||
| 18 | { |
||
| 19 | return $data instanceof Form && !$data->getForm(); |
||
| 20 | } |
||
| 21 | |||
| 22 | public static function getSubscribedServices(): array |
||
| 26 | ]; |
||
| 27 | } |
||
| 28 | } |
||
| 29 |