diff options
Diffstat (limited to 'app/AppKernel.php')
-rw-r--r-- | app/AppKernel.php | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php index c8382d5f..f1140943 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php | |||
@@ -1,7 +1,7 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use Symfony\Component\HttpKernel\Kernel; | ||
4 | use Symfony\Component\Config\Loader\LoaderInterface; | 3 | use Symfony\Component\Config\Loader\LoaderInterface; |
4 | use Symfony\Component\HttpKernel\Kernel; | ||
5 | 5 | ||
6 | class AppKernel extends Kernel | 6 | class AppKernel extends Kernel |
7 | { | 7 | { |
@@ -48,6 +48,10 @@ class AppKernel extends Kernel | |||
48 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); | 48 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); |
49 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); | 49 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); |
50 | $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); | 50 | $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); |
51 | |||
52 | if ('test' === $this->getEnvironment()) { | ||
53 | $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle(); | ||
54 | } | ||
51 | } | 55 | } |
52 | 56 | ||
53 | return $bundles; | 57 | return $bundles; |
@@ -60,16 +64,25 @@ class AppKernel extends Kernel | |||
60 | 64 | ||
61 | public function getCacheDir() | 65 | public function getCacheDir() |
62 | { | 66 | { |
63 | return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); | 67 | return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); |
64 | } | 68 | } |
65 | 69 | ||
66 | public function getLogDir() | 70 | public function getLogDir() |
67 | { | 71 | { |
68 | return dirname(__DIR__).'/var/logs'; | 72 | return dirname(__DIR__) . '/var/logs'; |
69 | } | 73 | } |
70 | 74 | ||
71 | public function registerContainerConfiguration(LoaderInterface $loader) | 75 | public function registerContainerConfiguration(LoaderInterface $loader) |
72 | { | 76 | { |
73 | $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); | 77 | $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); |
78 | $loader->load(function ($container) { | ||
79 | if ($container->getParameter('use_webpack_dev_server')) { | ||
80 | $container->loadFromExtension('framework', [ | ||
81 | 'assets' => [ | ||
82 | 'base_url' => 'http://localhost:8080/', | ||
83 | ], | ||
84 | ]); | ||
85 | } | ||
86 | }); | ||
74 | } | 87 | } |
75 | } | 88 | } |