TwigFormThemePass   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 9 2
1
<?php
2
3
namespace NVBooster\PHPCRAssetsBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\Exception\LogicException;
8
9
/**
10
 * @author nvb
11
 *
12
 */
13
class TwigFormThemePass implements CompilerPassInterface
14
{
15
    /**
16
     * @{inheritdoc}
17
     */
18
    public function process(ContainerBuilder $container)
19
    {
20
        if ($container->hasDefinition('nvbooster_assets.formtype.asset')) {           
21
            $twigFormThemes = $container->getParameter('twig.form.resources');
22
            $twigFormThemes[] = 'NVBoosterPHPCRAssetsBundle:Form:textasset_widget.html.twig';
23
            
24
            $container->setParameter('twig.form.resources', $twigFormThemes);
25
        }
26
    }
27
}