src/Sylius/Bundle/ReviewBundle/SyliusReviewBundle.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\ReviewBundle;
  12. use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
  13. use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
  14. use Sylius\Bundle\ReviewBundle\DependencyInjection\Compiler\RegisterReviewFactoryPass;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. final class SyliusReviewBundle extends AbstractResourceBundle
  17. {
  18.     /**
  19.      * {@inheritdoc}
  20.      */
  21.     public function getSupportedDrivers(): array
  22.     {
  23.         return [
  24.             SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
  25.         ];
  26.     }
  27.     /**
  28.      * {@inheritdoc}
  29.      */
  30.     public function build(ContainerBuilder $container): void
  31.     {
  32.         parent::build($container);
  33.         $container->addCompilerPass(new RegisterReviewFactoryPass());
  34.     }
  35.     /**
  36.      * {@inheritdoc}
  37.      */
  38.     protected function getModelNamespace(): string
  39.     {
  40.         return 'Sylius\Component\Review\Model';
  41.     }
  42. }