forked from ezsystems/ezplatform-ee-demo
/
AppKernel.php
100 lines (96 loc) · 4.95 KB
/
AppKernel.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
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
<?php
/**
* File containing the AppKernel class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
use eZ\Bundle\EzPublishCoreBundle\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
/**
* Returns an array of bundles to registers.
*
* @return array An array of bundle instances.
*
* @api
*/
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 Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Tedivm\StashBundle\TedivmStashBundle(),
new Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle(),
new Liip\ImagineBundle\LiipImagineBundle(),
new FOS\HttpCacheBundle\FOSHttpCacheBundle(),
new eZ\Bundle\EzPublishCoreBundle\EzPublishCoreBundle(),
new eZ\Bundle\EzPublishLegacySearchEngineBundle\EzPublishLegacySearchEngineBundle(),
new eZ\Bundle\EzPublishIOBundle\EzPublishIOBundle(),
new eZ\Bundle\EzPublishRestBundle\EzPublishRestBundle(),
new EzSystems\CommentsBundle\EzSystemsCommentsBundle(),
new EzSystems\LandingPageFieldTypeBundle\EzSystemsLandingPageFieldTypeBundle(),
new EzSystems\FormBuilderBundle\EzSystemsFormBuilderBundle(),
new EzSystems\StudioUIBundle\EzSystemsStudioUIBundle(),
new EzSystems\StudioDemoBundle\EzSystemsStudioDemoBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new EzSystems\ShareButtonsBundle\EzSystemsShareButtonsBundle(),
new EzSystems\RecommendationBundle\EzSystemsRecommendationBundle(),
new EzSystems\FlexWorkflowBundle\EzSystemsFlexWorkflowBundle(),
new EzSystems\PlatformUIAssetsBundle\EzSystemsPlatformUIAssetsBundle(),
new EzSystems\PlatformUIBundle\EzSystemsPlatformUIBundle(),
new EzSystems\EzSupportToolsBundle\EzSystemsEzSupportToolsBundle(),
new EzSystems\NotificationBundle\EzSystemsNotificationBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
new Oneup\FlysystemBundle\OneupFlysystemBundle(),
new EzSystems\PlatformInstallerBundle\EzSystemsPlatformInstallerBundle(),
new EzSystems\RepositoryFormsBundle\EzSystemsRepositoryFormsBundle(),
new EzSystems\EzPlatformSolrSearchEngineBundle\EzSystemsEzPlatformSolrSearchEngineBundle(),
new EzSystems\EzContentOnTheFlyBundle\EzSystemsEzContentOnTheFlyBundle(),
new Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle(),
new JMS\TranslationBundle\JMSTranslationBundle(),
new EzSystems\CronBundle\EzSystemsCronBundle(),
new EzSystems\DateBasedPublisherBundle\EzSystemsDateBasedPublisherBundle(),
new EzSystems\PersonalizedBlockBundle\EzSystemsPersonalizedBlockBundle(),
new Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle(),
new Netgen\TagsBundle\NetgenTagsBundle(),
new AppBundle\AppBundle(),
);
switch ($this->getEnvironment()) {
case 'test':
case 'behat':
$bundles[] = new EzSystems\BehatBundle\EzSystemsBehatBundle();
$bundles[] = new EzSystems\PlatformBehatBundle\EzPlatformBehatBundle();
// No break, test also needs dev bundles
case 'dev':
$bundles[] = new eZ\Bundle\EzPublishDebugBundle\EzPublishDebugBundle();
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Egulias\ListenersDebugCommandBundle\EguliasListenersDebugCommandBundle();
}
return $bundles;
}
/**
* Loads the container configuration.
*
* @param LoaderInterface $loader A LoaderInterface instance
* @throws \RuntimeException when config file is not readable
*
* @api
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
}
}