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

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