| Conditions | 5 |
| Paths | 5 |
| Total Lines | 22 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public static function shouldRedirectToEdit( |
||
| 12 | FormInterface $form, |
||
| 13 | Request $request, |
||
| 14 | AdminConfiguration $configuration |
||
| 15 | ): bool { |
||
| 16 | if (!$form->isSubmitted()) { |
||
| 17 | return false; |
||
| 18 | } |
||
| 19 | |||
| 20 | if (!$form->isValid()) { |
||
| 21 | return false; |
||
| 22 | } |
||
| 23 | |||
| 24 | if ($request->get('submit_and_redirect')) { |
||
| 25 | return false; |
||
| 26 | } |
||
| 27 | |||
| 28 | if (!key_exists('edit', $configuration->getParameter('actions'))) { |
||
| 29 | return false; |
||
| 30 | } |
||
| 31 | |||
| 32 | return true; |
||
| 33 | } |
||
| 63 |