vendor/sylius/grid-bundle/src/Bundle/SyliusGridBundle.php line 23

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the Sylius package.
  4. *
  5. * (c) Sylius Sp. z o.o.
  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\GridBundle;
  12. use Sylius\Bundle\GridBundle\DependencyInjection\Compiler\RegisterDriversPass;
  13. use Sylius\Bundle\GridBundle\DependencyInjection\Compiler\RegisterFieldTypesPass;
  14. use Sylius\Bundle\GridBundle\DependencyInjection\Compiler\RegisterFiltersPass;
  15. use Sylius\Bundle\GridBundle\DependencyInjection\Compiler\RegisterStubCommandsPass;
  16. use Symfony\Component\DependencyInjection\ContainerBuilder;
  17. use Symfony\Component\HttpKernel\Bundle\Bundle;
  18. final class SyliusGridBundle extends Bundle
  19. {
  20. public const DRIVER_DOCTRINE_ORM = 'doctrine/orm';
  21. public const DRIVER_DOCTRINE_PHPCR_ODM = 'doctrine/phpcr-odm';
  22. public function build(ContainerBuilder $container): void
  23. {
  24. parent::build($container);
  25. $container->addCompilerPass(new RegisterDriversPass());
  26. $container->addCompilerPass(new RegisterFiltersPass());
  27. $container->addCompilerPass(new RegisterFieldTypesPass());
  28. $container->addCompilerPass(new RegisterStubCommandsPass());
  29. }
  30. /**
  31. * @return string[]
  32. */
  33. public static function getAvailableDrivers(): array
  34. {
  35. return [
  36. self::DRIVER_DOCTRINE_ORM,
  37. self::DRIVER_DOCTRINE_PHPCR_ODM,
  38. ];
  39. }
  40. }