vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php line 25

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\CoreBundle;
  12. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\BackwardsCompatibility\ResolveShopUserTargetEntityPass;
  13. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\IgnoreAnnotationsPass;
  14. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\LazyCacheWarmupPass;
  15. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterTaxCalculationStrategiesPass;
  16. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\TranslatableEntityLocalePass;
  17. use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
  18. use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
  19. use Symfony\Component\DependencyInjection\ContainerBuilder;
  20. final class SyliusCoreBundle extends AbstractResourceBundle
  21. {
  22.     /**
  23.      * {@inheritdoc}
  24.      */
  25.     public function getSupportedDrivers(): array
  26.     {
  27.         return [
  28.             SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
  29.         ];
  30.     }
  31.     /**
  32.      * {@inheritdoc}
  33.      */
  34.     public function build(ContainerBuilder $container): void
  35.     {
  36.         parent::build($container);
  37.         $container->addCompilerPass(new LazyCacheWarmupPass());
  38.         $container->addCompilerPass(new RegisterTaxCalculationStrategiesPass());
  39.         $container->addCompilerPass(new TranslatableEntityLocalePass());
  40.         $container->addCompilerPass(new IgnoreAnnotationsPass());
  41.         $container->addCompilerPass(new ResolveShopUserTargetEntityPass());
  42.     }
  43.     /**
  44.      * {@inheritdoc}
  45.      */
  46.     protected function getModelNamespace(): string
  47.     {
  48.         return 'Sylius\Component\Core\Model';
  49.     }
  50. }