-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrouzieWidgetsBundle.php
35 lines (30 loc) · 1.42 KB
/
BrouzieWidgetsBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace Brouzie\WidgetsBundle;
use Brouzie\WidgetsBundle\Cache\CacheKeyGenerator;
use Brouzie\WidgetsBundle\DependencyInjection\Compiler\AddFailureStrategiesPass;
use Brouzie\WidgetsBundle\DependencyInjection\Compiler\AddLoadersPass;
use Brouzie\WidgetsBundle\DependencyInjection\Compiler\AddRenderersPass;
use Brouzie\WidgetsBundle\DependencyInjection\Compiler\RegisterObjectNormalizersPass;
use Brouzie\WidgetsBundle\DependencyInjection\Compiler\RegisterProfilerPass;
use Brouzie\WidgetsBundle\DependencyInjection\Compiler\RegisterWidgetsPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class BrouzieWidgetsBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new RegisterWidgetsPass());
$container->addCompilerPass(new AddLoadersPass());
$container->addCompilerPass(new AddRenderersPass());
$container->addCompilerPass(new AddFailureStrategiesPass());
$container->addCompilerPass(new RegisterProfilerPass());
$container->addCompilerPass(new RegisterObjectNormalizersPass());
}
public function boot()
{
if ($this->container->has('brouzie_widgets.cache.object_normalizer')) {
CacheKeyGenerator::registerObjectNormalizer($this->container->get('brouzie_widgets.cache.object_normalizer'));
}
}
}