|
1
|
|
|
<?php |
|
2
|
|
|
use Symfony\Component\HttpKernel\Kernel; |
|
3
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface; |
|
4
|
|
|
|
|
5
|
|
|
class AppKernel extends Kernel |
|
6
|
|
|
{ |
|
7
|
|
|
public function registerBundles() |
|
8
|
|
|
{ |
|
9
|
|
|
$bundles = array( |
|
10
|
|
|
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
|
11
|
|
|
new Symfony\Bundle\SecurityBundle\SecurityBundle(), |
|
12
|
|
|
new Symfony\Bundle\MonologBundle\MonologBundle(), |
|
13
|
|
|
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), |
|
14
|
|
|
new Symfony\Bundle\AsseticBundle\AsseticBundle(), |
|
15
|
|
|
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), |
|
16
|
|
|
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), |
|
17
|
|
|
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), |
|
18
|
|
|
new FOS\RestBundle\FOSRestBundle(), |
|
19
|
|
|
new Nelmio\ApiDocBundle\NelmioApiDocBundle(), |
|
20
|
|
|
new JMS\SerializerBundle\JMSSerializerBundle(), |
|
21
|
|
|
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), |
|
22
|
|
|
new Symfony\Bundle\TwigBundle\TwigBundle(), |
|
23
|
|
|
new Nelmio\CorsBundle\NelmioCorsBundle(), |
|
24
|
|
|
new AppBundle\AppBundle(), |
|
25
|
|
|
new Sonata\CoreBundle\SonataCoreBundle(), |
|
26
|
|
|
new Sonata\AdminBundle\SonataAdminBundle(), |
|
27
|
|
|
new Sonata\BlockBundle\SonataBlockBundle(), |
|
28
|
|
|
new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(), |
|
29
|
|
|
new Sonata\IntlBundle\SonataIntlBundle(), |
|
30
|
|
|
new Sonata\MediaBundle\SonataMediaBundle(), |
|
31
|
|
|
new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(), |
|
32
|
|
|
new Application\Sonata\MediaBundle\ApplicationSonataMediaBundle(), |
|
33
|
|
|
new Knp\Bundle\MenuBundle\KnpMenuBundle(), |
|
34
|
|
|
new Sonata\TranslationBundle\SonataTranslationBundle(), |
|
35
|
|
|
new Liip\MonitorBundle\LiipMonitorBundle(), |
|
36
|
|
|
new FOS\HttpCacheBundle\FOSHttpCacheBundle(), |
|
37
|
|
|
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), |
|
38
|
|
|
); |
|
39
|
|
|
if (in_array($this->getEnvironment(), array('dev', 'test'))) { |
|
40
|
|
|
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); |
|
41
|
|
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); |
|
42
|
|
|
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); |
|
43
|
|
|
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); |
|
44
|
|
|
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); |
|
45
|
|
|
$bundles[] = new Hautelook\AliceBundle\HautelookAliceBundle(); |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
return $bundles; |
|
49
|
|
|
} |
|
50
|
|
|
public function registerContainerConfiguration(LoaderInterface $loader) |
|
51
|
|
|
{ |
|
52
|
|
|
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); |
|
53
|
|
|
} |
|
54
|
|
|
} |
|
55
|
|
|
|