| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 3 | public function process(ContainerBuilder $container) |
|
| 25 | { |
||
| 26 | /* @var Definition $def */ |
||
| 27 | 3 | if (!$container->hasDefinition('php_translator.edit_in_place.xtrans_html_translator')) { |
|
| 28 | 1 | return; |
|
| 29 | } |
||
| 30 | |||
| 31 | // Replace the Twig Translator by a custom HTML one |
||
| 32 | 2 | $container->getDefinition('twig.extension.trans')->replaceArgument( |
|
| 33 | 2 | 0, |
|
| 34 | 2 | new Reference('php_translator.edit_in_place.xtrans_html_translator') |
|
| 35 | 2 | ); |
|
| 36 | 2 | } |
|
| 37 | } |
||
| 38 |