| Conditions | 5 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | private function injectFormThemeConfiguration(ContainerBuilder $container) |
||
| 30 | { |
||
| 31 | if (($twigConfiguration = $container->getParameter('admingenerator.twig')) !== false) { |
||
| 32 | $resources = $container->getParameter('twig.form.resources'); |
||
| 33 | $alreadyIn = in_array('bootstrap_3_layout.html.twig', $resources); |
||
| 34 | |||
| 35 | if ($twigConfiguration['use_form_resources'] && !$alreadyIn) { |
||
| 36 | $key = array_search('form_div_layout.html.twig', $resources) ? array_search('form_div_layout.html.twig', $resources) : 0; |
||
| 37 | // Insert right after form_div_layout.html.twig if exists |
||
| 38 | array_splice($resources, ++$key, 0, array('bootstrap_3_layout.html.twig')); |
||
| 39 | |||
| 40 | $container->setParameter('twig.form.resources', $resources); |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 | } |
||
| 45 |