vendor/pimcore/pimcore/bundles/EcommerceFrameworkBundle/PimcoreEcommerceFrameworkBundle.php line 29

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 Commercial License (PCL)
  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 PCL
  13.  */
  14. namespace Pimcore\Bundle\EcommerceFrameworkBundle;
  15. use Pimcore\Bundle\EcommerceFrameworkBundle\DependencyInjection\Compiler\RegisterConfiguredServicesPass;
  16. use Pimcore\Bundle\EcommerceFrameworkBundle\Tools\Installer;
  17. use Pimcore\Bundle\EcommerceFrameworkBundle\Type\Decimal;
  18. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  19. use Pimcore\Extension\Bundle\Traits\StateHelperTrait;
  20. use Pimcore\Version;
  21. use Symfony\Component\DependencyInjection\ContainerBuilder;
  22. /**
  23.  * @internal
  24.  */
  25. class PimcoreEcommerceFrameworkBundle extends AbstractPimcoreBundle
  26. {
  27.     use StateHelperTrait;
  28.     /**
  29.      * {@inheritdoc}
  30.      */
  31.     public function getVersion()
  32.     {
  33.         return sprintf('%s build %s'Version::getVersion(), Version::getRevision());
  34.     }
  35.     /**
  36.      * {@inheritdoc}
  37.      */
  38.     public function build(ContainerBuilder $container)
  39.     {
  40.         $container->addCompilerPass(new RegisterConfiguredServicesPass());
  41.     }
  42.     /**
  43.      * @return array
  44.      */
  45.     public function getCssPaths()
  46.     {
  47.         return [
  48.             '/bundles/pimcoreecommerceframework/css/backend.css',
  49.             '/bundles/pimcoreecommerceframework/css/pricing.css',
  50.         ];
  51.     }
  52.     /**
  53.      * @return array
  54.      */
  55.     public function getJsPaths()
  56.     {
  57.         return [
  58.             '/bundles/pimcoreecommerceframework/js/indexfieldselectionfield/data/indexFieldSelectionField.js',
  59.             '/bundles/pimcoreecommerceframework/js/indexfieldselectionfield/tags/indexFieldSelectionField.js',
  60.             '/bundles/pimcoreecommerceframework/js/indexfieldselectionfield/data/indexFieldSelectionCombo.js',
  61.             '/bundles/pimcoreecommerceframework/js/indexfieldselectionfield/tags/indexFieldSelectionCombo.js',
  62.             '/bundles/pimcoreecommerceframework/js/indexfieldselectionfield/data/indexFieldSelection.js',
  63.             '/bundles/pimcoreecommerceframework/js/indexfieldselectionfield/tags/indexFieldSelection.js',
  64.             '/bundles/pimcoreecommerceframework/js/bundle.js',
  65.             '/bundles/pimcoreecommerceframework/js/pricing/config/panel.js',
  66.             '/bundles/pimcoreecommerceframework/js/pricing/config/item.js',
  67.             '/bundles/pimcoreecommerceframework/js/pricing/config/objects.js',
  68.             '/bundles/pimcoreecommerceframework/js/voucherservice/VoucherSeriesTab.js',
  69.             '/bundles/pimcoreecommerceframework/js/order/OrderTab.js',
  70.             '/admin/ecommerceframework/config/js-config',
  71.         ];
  72.     }
  73.     public function boot()
  74.     {
  75.         $container $this->container;
  76.         // set default decimal scale from config
  77.         Decimal::setDefaultScale($container->getParameter('pimcore_ecommerce.decimal_scale'));
  78.     }
  79.     /**
  80.      * @return Installer
  81.      */
  82.     public function getInstaller()
  83.     {
  84.         return $this->container->get(Installer::class);
  85.     }
  86. }