-
Notifications
You must be signed in to change notification settings - Fork 600
Expand file tree
/
Copy pathAppKernel.php
More file actions
112 lines (98 loc) · 4.73 KB
/
AppKernel.php
File metadata and controls
112 lines (98 loc) · 4.73 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
use Cocorico\ConfigBundle\DependencyInjection\Compiler\ContainerBuilder;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new JMS\I18nRoutingBundle\JMSI18nRoutingBundle(),
new JMS\TranslationBundle\JMSTranslationBundle(),
new JMS\AopBundle\JMSAopBundle(),
new JMS\DiExtraBundle\JMSDiExtraBundle(),
new FOS\UserBundle\FOSUserBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(),
new Sonata\AdminBundle\SonataAdminBundle(),
new Sonata\CoreBundle\SonataCoreBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),
new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
new Sonata\UserBundle\SonataUserBundle(),
new A2lix\TranslationFormBundle\A2lixTranslationFormBundle(),
new Oneup\UploaderBundle\OneupUploaderBundle(),
new Liip\ImagineBundle\LiipImagineBundle(),
new Lexik\Bundle\CurrencyBundle\LexikCurrencyBundle(),
new Bazinga\GeocoderBundle\BazingaGeocoderBundle(),
new FOS\MessageBundle\FOSMessageBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new WhiteOctober\BreadcrumbsBundle\WhiteOctoberBreadcrumbsBundle(),
new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
new FM\ElfinderBundle\FMElfinderBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new SimpleThings\EntityAudit\SimpleThingsEntityAuditBundle(),
//Required bundles
new Cocorico\CoreBundle\CocoricoCoreBundle(),
new Cocorico\GeoBundle\CocoricoGeoBundle(),
new Cocorico\UserBundle\CocoricoUserBundle(),
new Cocorico\PageBundle\CocoricoPageBundle(),
new Cocorico\CMSBundle\CocoricoCMSBundle(),
new Cocorico\BreadcrumbBundle\CocoricoBreadcrumbBundle(),
new Cocorico\MessageBundle\CocoricoMessageBundle(),
new Cocorico\ContactBundle\CocoricoContactBundle(),
new Cocorico\ReviewBundle\CocoricoReviewBundle(),
new Cocorico\ConfigBundle\CocoricoConfigBundle(),
new Cocorico\TimeBundle\CocoricoTimeBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test', 'staging'), true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Hpatoio\DeployBundle\DeployBundle();
if ('dev' === $this->getEnvironment()) {
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
}
return $bundles;
}
public function getRootDir()
{
return __DIR__;
}
public function getCacheDir()
{
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
}
public function getLogDir()
{
return dirname(__DIR__) . '/var/logs';
}
/** @inheritdoc */
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(
function (ContainerBuilder $container) {
$container->setParameter('container.autowiring.strict_mode', true);
$container->setParameter('container.dumper.inline_class_loader', true);
$container->addObjectResource($this);
}
);
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
}
protected function getContainerBuilder()
{
return new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
}
}