mirror of
https://github.com/jbcr/SyliusCmsPlugin.git
synced 2026-03-25 09:22:07 +01:00
42 lines
1.3 KiB
PHP
Executable File
42 lines
1.3 KiB
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Sylius\Bundle\CoreBundle\Application\Kernel;
|
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
|
|
|
class AppKernel extends Kernel
|
|
{
|
|
public function registerBundles(): array
|
|
{
|
|
$bundles = array_merge(parent::registerBundles(), [
|
|
new \Sylius\Bundle\AdminBundle\SyliusAdminBundle(),
|
|
new \Sylius\Bundle\ShopBundle\SyliusShopBundle(),
|
|
|
|
new \FOS\OAuthServerBundle\FOSOAuthServerBundle(), // Required by SyliusApiBundle
|
|
new \Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle(),
|
|
|
|
new \FOS\CKEditorBundle\FOSCKEditorBundle(),
|
|
new \SitemapPlugin\SitemapPlugin(),
|
|
new \BitBag\SyliusCmsPlugin\BitBagSyliusCmsPlugin(),
|
|
]);
|
|
|
|
if (in_array($this->getEnvironment(), ['dev', 'test', 'test_cached'], true)) {
|
|
$bundles[] = new \Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle();
|
|
$bundles[] = new \Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle();
|
|
}
|
|
|
|
return $bundles;
|
|
}
|
|
|
|
public function registerContainerConfiguration(LoaderInterface $loader): void
|
|
{
|
|
$loader->load($this->getProjectDir() . '/app/config/config_' . $this->environment . '.yml');
|
|
}
|
|
|
|
public function getProjectDir(): string
|
|
{
|
|
return dirname(__DIR__);
|
|
}
|
|
}
|