Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function process(ContainerBuilder $container) |
||
12 | { |
||
13 | if ($container->has('twig.runtime_loader')) { |
||
14 | // If official Twig runtime loader exists, |
||
15 | // we skip using our custom runtime loader |
||
16 | return; |
||
17 | } |
||
18 | |||
19 | $twig = $container->findDefinition('twig'); |
||
20 | |||
21 | $twig->addMethodCall( |
||
22 | 'addRuntimeLoader', |
||
23 | array( |
||
24 | new Reference('netgen_open_graph.templating.twig.runtime.loader'), |
||
25 | ) |
||
26 | ); |
||
27 | } |
||
28 | } |
||
29 |