Completed
Push — master ( e6cdbc...9c797c )
by Kristof
40:05 queued 25:37
created

KunstmaanDashboardExtension::prepend()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Kunstmaan\DashboardBundle\DependencyInjection;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
8
use Symfony\Component\DependencyInjection\Loader;
9
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
10
11
/**
12
 * This is the class that loads and manages your bundle configuration
13
 *
14
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
15
 */
16
class KunstmaanDashboardExtension extends Extension implements PrependExtensionInterface
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function load(array $configs, ContainerBuilder $container)
22
    {
23
        $configuration = new Configuration();
24
        $this->processConfiguration($configuration, $configs);
25
26
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
27
        $loader->load('services.yml');
28
        $loader->load('commands.yml');
29
    }
30
31
    public function prepend(ContainerBuilder $container)
32
    {
33
        $container->prependExtensionConfig('framework', ['esi' => ['enabled' => true]]);
34
    }
35
}
36