src/Kernel.php line 101

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under two different licenses:
  6.  * - GNU General Public License version 3 (GPLv3)
  7.  * - Pimcore Enterprise License (PEL)
  8.  * Full copyright and license information is available in
  9.  * LICENSE.md which is distributed with this source code.
  10.  *
  11.  * @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.  * @license    http://www.pimcore.org/license     GPLv3 and PEL
  13.  */
  14. namespace App;
  15. use Factory\Shipping\CustomerServiceBundle\FactoryShippingCustomerServiceBundle;
  16. use Factory\Shipping\EnterPersonalAccountBundle\FactoryShippingEnterPersonalAccountBundle;
  17. use Factory\Shipping\UpsBundle\FactoryShippingUpsBundle;
  18. use Factory\Payment\AuthorizeBundle\FactoryPaymentAuthorizeBundle;
  19. use Factory\Payment\PurchaseOrderBundle\FactoryPaymentPurchaseOrderBundle;
  20. use Factory\PaymentBundle\FactoryPaymentBundle;
  21. use Factory\CartBundle\FactoryCartBundle;
  22. use Factory\CheckoutBundle\FactoryCheckoutBundle;
  23. use Factory\OrderManagementBundle\FactoryOrderManagementBundle;
  24. use Factory\ShippingBundle\FactoryShippingBundle;
  25. use Factory\SupportBundle\Contract\DataMapper\AbstractDataMapper;
  26. use Factory\SupportBundle\FactorySupportBundle;
  27. use Pimcore\Bundle\CoreBundle\PimcoreCoreBundle;
  28. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  29. class Kernel extends \Pimcore\Kernel
  30. {
  31.     /**
  32.      * Adds bundles to register to the bundle collection. The collection is able
  33.      * to handle priorities and environment specific bundles.
  34.      *
  35.      * @param BundleCollection $collection
  36.      */
  37.     public function registerBundlesToCollection(BundleCollection $collection)
  38.     {
  39. //        if (class_exists('\\App\\App')) {
  40. //            $collection->addBundle(new \App\App);
  41. //        }
  42.         if (class_exists('\Pimcore\Bundle\LegacyBundle\PimcoreLegacyBundle')) {
  43.             $collection->addBundle(new \Pimcore\Bundle\LegacyBundle\PimcoreLegacyBundle);
  44.         }
  45.         if (class_exists(FactoryCartBundle::class)) {
  46.             $collection->addBundle(new FactoryCartBundle());
  47.         }
  48.         if (class_exists(FactoryCheckoutBundle::class)) {
  49.             $collection->addBundle(new FactoryCheckoutBundle());
  50.         }
  51.         if (class_exists(FactoryOrderManagementBundle::class)) {
  52.             $collection->addBundle(new FactoryOrderManagementBundle());
  53.         }
  54.         if (class_exists(FactoryPaymentAuthorizeBundle::class)) {
  55.             $collection->addBundle(new FactoryPaymentAuthorizeBundle());
  56.         }
  57.         if (class_exists(FactoryPaymentPurchaseOrderBundle::class)) {
  58.             $collection->addBundle(new FactoryPaymentPurchaseOrderBundle());
  59.         }
  60.         if (class_exists(FactoryPaymentBundle::class)) {
  61.             $collection->addBundle(new FactoryPaymentBundle());
  62.         }
  63.         if (class_exists(FactoryShippingCustomerServiceBundle::class)) {
  64.             $collection->addBundle(new FactoryShippingCustomerServiceBundle());
  65.         }
  66.         if (class_exists(FactoryShippingUpsBundle::class)) {
  67.             $collection->addBundle(new FactoryShippingUpsBundle());
  68.         }
  69.         if (class_exists(FactoryShippingEnterPersonalAccountBundle::class)) {
  70.             $collection->addBundle(new FactoryShippingEnterPersonalAccountBundle());
  71.         }
  72.         if (class_exists(FactoryShippingBundle::class)) {
  73.             $collection->addBundle(new FactoryShippingBundle());
  74.         }
  75.         if (class_exists(FactorySupportBundle::class)) {
  76.             $collection->addBundle(new FactorySupportBundle());
  77.         }
  78.         if (class_exists(PimcoreCoreBundle::class)) {
  79.             $collection->addBundle(new PimcoreCoreBundle());
  80.         }
  81.     }
  82.     public function boot()
  83.     {
  84.         parent::boot();
  85.         AbstractDataMapper::setTransaltor($this->getContainer()->get('translator'));
  86.     }
  87. }