Code

< 40 %
40-60 %
> 60 %
1
<?php
2
3
/*
4
 * This file is part of the puli/symfony-bundle package.
5
 *
6
 * (c) Bernhard Schussek <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Puli\SymfonyBundle;
13
14
use Puli\SymfonyBundle\DependencyInjection\Compiler\TwigLoaderPass;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use Symfony\Component\HttpKernel\Bundle\Bundle;
17
18
/**
19
 * @since  1.0
20
 *
21
 * @author Bernhard Schussek <[email protected]>
22
 */
23
class PuliBundle extends Bundle
24
{
25 3
    public function build(ContainerBuilder $container)
26
    {
27 3
        parent::build($container);
28
29 3
        if (class_exists('Puli\TwigExtension\PuliExtension')) {
30 3
            $container->addCompilerPass(new TwigLoaderPass());
31
        }
32 3
    }
33
}
34