vendor/coreshop/rule-bundle/CoreShopRuleBundle.php line 23

Open in your IDE?
  1. <?php
  2. /**
  3.  * CoreShop.
  4.  *
  5.  * This source file is subject to the GNU General Public License version 3 (GPLv3)
  6.  * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
  7.  * files that are distributed with this source code.
  8.  *
  9.  * @copyright  Copyright (c) CoreShop GmbH (https://www.coreshop.org)
  10.  * @license    https://www.coreshop.org/license     GNU General Public License version 3 (GPLv3)
  11.  */
  12. declare(strict_types=1);
  13. namespace CoreShop\Bundle\RuleBundle;
  14. use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
  15. use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
  16. use CoreShop\Bundle\RuleBundle\DependencyInjection\Compiler\RuleAvailabilityAssessorPass;
  17. use CoreShop\Bundle\RuleBundle\DependencyInjection\Compiler\TraceableValidationProcessorPass;
  18. use Symfony\Component\DependencyInjection\ContainerBuilder;
  19. final class CoreShopRuleBundle extends AbstractResourceBundle
  20. {
  21.     public function getSupportedDrivers(): array
  22.     {
  23.         return [
  24.             CoreShopResourceBundle::DRIVER_DOCTRINE_ORM,
  25.         ];
  26.     }
  27.     public function build(ContainerBuilder $container): void
  28.     {
  29.         parent::build($container);
  30.         $container->addCompilerPass(new TraceableValidationProcessorPass());
  31.         $container->addCompilerPass(new RuleAvailabilityAssessorPass());
  32.     }
  33.     protected function getModelNamespace(): string
  34.     {
  35.         return 'CoreShop\Component\Rule\Model';
  36.     }
  37. }