|
| 1 | +<?php |
| 2 | + |
| 3 | +use Symfony\Component\Config\Loader\LoaderInterface; |
| 4 | +use Symfony\Component\HttpKernel\Kernel; |
| 5 | + |
| 6 | +class DistributionKernel extends Kernel |
| 7 | +{ |
| 8 | + /** |
| 9 | + * {@inheritdoc} |
| 10 | + */ |
| 11 | + public function registerBundles() |
| 12 | + { |
| 13 | + $bundles = array( |
| 14 | + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
| 15 | + new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), |
| 16 | + new Symfony\Bundle\TwigBundle\TwigBundle(), |
| 17 | + new Symfony\Bundle\AsseticBundle\AsseticBundle(), |
| 18 | + new Symfony\Bundle\MonologBundle\MonologBundle(), |
| 19 | + new Oro\Bundle\DistributionBundle\OroDistributionBundle(), |
| 20 | + new Symfony\Bundle\SecurityBundle\SecurityBundle(), |
| 21 | + new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), |
| 22 | + new Oro\Bundle\HelpBundle\OroHelpBundle(), |
| 23 | + new Lexik\Bundle\MaintenanceBundle\LexikMaintenanceBundle(), |
| 24 | + new Oro\Bundle\PlatformBundle\OroPlatformBundle(), |
| 25 | + new Oro\Bundle\InstallerBundle\OroInstallerBundle(), |
| 26 | + ); |
| 27 | + |
| 28 | + if ('dev' === $this->getEnvironment()) { |
| 29 | + $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); |
| 30 | + $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); |
| 31 | + if (class_exists('Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle')) { |
| 32 | + $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); |
| 33 | + } |
| 34 | + } |
| 35 | + |
| 36 | + return $bundles; |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * {@inheritdoc} |
| 41 | + */ |
| 42 | + public function getCacheDir() |
| 43 | + { |
| 44 | + return $this->rootDir . '/cache/dist/' . $this->environment; |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * {@inheritdoc} |
| 49 | + * |
| 50 | + * @api |
| 51 | + */ |
| 52 | + public function getLogDir() |
| 53 | + { |
| 54 | + return $this->rootDir . '/logs/dist'; |
| 55 | + } |
| 56 | + |
| 57 | + |
| 58 | + /** |
| 59 | + * {@inheritdoc} |
| 60 | + */ |
| 61 | + public function registerContainerConfiguration(LoaderInterface $loader) |
| 62 | + { |
| 63 | + $loader->load(__DIR__ . '/config/dist/config_' . $this->getEnvironment().'.yml'); |
| 64 | + } |
| 65 | +} |
0 commit comments