vendor/coreshop/core-shop/src/CoreShop/Bundle/NotificationBundle/CoreShopNotificationBundle.php line 30

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * CoreShop
  5.  *
  6.  * This source file is available under two different licenses:
  7.  *  - GNU General Public License version 3 (GPLv3)
  8.  *  - CoreShop Commercial License (CCL)
  9.  * Full copyright and license information is available in
  10.  * LICENSE.md which is distributed with this source code.
  11.  *
  12.  * @copyright  Copyright (c) CoreShop GmbH (https://www.coreshop.org)
  13.  * @license    https://www.coreshop.org/license     GPLv3 and CCL
  14.  *
  15.  */
  16. namespace CoreShop\Bundle\NotificationBundle;
  17. use CoreShop\Bundle\MessengerBundle\CoreShopMessengerBundle;
  18. use CoreShop\Bundle\NotificationBundle\DependencyInjection\Compiler\NotificationRuleActionPass;
  19. use CoreShop\Bundle\NotificationBundle\DependencyInjection\Compiler\NotificationRuleConditionPass;
  20. use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
  21. use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
  22. use CoreShop\Bundle\RuleBundle\CoreShopRuleBundle;
  23. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  24. use Symfony\Component\DependencyInjection\ContainerBuilder;
  25. final class CoreShopNotificationBundle extends AbstractResourceBundle
  26. {
  27.     public function getSupportedDrivers(): array
  28.     {
  29.         return [
  30.             CoreShopResourceBundle::DRIVER_DOCTRINE_ORM,
  31.         ];
  32.     }
  33.     public function build(ContainerBuilder $container): void
  34.     {
  35.         parent::build($container);
  36.         $container->addCompilerPass(new NotificationRuleActionPass());
  37.         $container->addCompilerPass(new NotificationRuleConditionPass());
  38.     }
  39.     public static function registerDependentBundles(BundleCollection $collection): void
  40.     {
  41.         parent::registerDependentBundles($collection);
  42.         $collection->addBundle(new CoreShopRuleBundle(), 3500);
  43.         $collection->addBundle(new CoreShopMessengerBundle(), 3550);
  44.     }
  45.     protected function getModelNamespace(): string
  46.     {
  47.         return 'CoreShop\Component\Notification\Model';
  48.     }
  49. }