vendor/sylius/sylius/src/Sylius/Bundle/LocaleBundle/SyliusLocaleBundle.php line 21

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\LocaleBundle;
  12. use Sylius\Bundle\LocaleBundle\DependencyInjection\Compiler\CompositeLocaleContextPass;
  13. use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
  14. use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. final class SyliusLocaleBundle extends AbstractResourceBundle
  17. {
  18.     public function build(ContainerBuilder $container): void
  19.     {
  20.         parent::build($container);
  21.         $container->addCompilerPass(new CompositeLocaleContextPass());
  22.     }
  23.     public function getSupportedDrivers(): array
  24.     {
  25.         return [
  26.             SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
  27.             SyliusResourceBundle::DRIVER_DOCTRINE_MONGODB_ODM,
  28.         ];
  29.     }
  30.     /**
  31.      * @psalm-suppress MismatchingDocblockReturnType https://github.com/vimeo/psalm/issues/2345
  32.      */
  33.     protected function getModelNamespace(): string
  34.     {
  35.         return 'Sylius\Component\Locale\Model';
  36.     }
  37. }