vendor/pimcore/data-hub-file-export/src/PimcoreDataHubFileExportBundle.php line 26

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under following license:
  6.  * - Pimcore Commercial License (PCL)
  7.  *
  8.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  9.  *  @license    http://www.pimcore.org/license     PCL
  10.  */
  11. namespace Pimcore\Bundle\DataHubFileExportBundle;
  12. use Pimcore\Bundle\DataHubBundle\PimcoreDataHubBundle;
  13. use Pimcore\Bundle\DataHubFileExportBundle\DependencyInjection\Compiler\ExportTransmitterDefinitionPass;
  14. use Pimcore\Bundle\DataHubFileExportBundle\DependencyInjection\Compiler\ExportTypeDefinitionPass;
  15. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Bundle\EnterpriseBundleInterface;
  16. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle;
  17. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  18. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  19. use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
  20. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  21. use Symfony\Component\DependencyInjection\ContainerBuilder;
  22. class PimcoreDataHubFileExportBundle extends AbstractPimcoreBundle implements DependentBundleInterfaceEnterpriseBundleInterface
  23. {
  24.     use PackageVersionTrait;
  25.     public function getJsPaths()
  26.     {
  27.         return [
  28.             '/bundles/pimcoredatahubfileexport/js/pimcore/startup.js',
  29.             '/bundles/pimcoredatahubfileexport/js/adapter/fileExport.js',
  30.             '/bundles/pimcoredatahubfileexport/js/configuration/abstractConfigItem.js',
  31.             '/bundles/pimcoredatahubfileexport/js/configuration/gridConfigDialog.js',
  32.             '/bundles/pimcoredatahubfileexport/js/configuration/configEvents.js',
  33.             '/bundles/pimcoredatahubfileexport/js/configuration/fileExport/configItem.js',
  34.             '/bundles/pimcoredatahubfileexport/js/configuration/fileExport/execution.js',
  35.             '/bundles/pimcoredatahubfileexport/js/configuration/fileExport/logTab.js',
  36.             '/bundles/pimcoredatahubfileexport/js/configuration/fileExport/transmitter.js',
  37.             '/bundles/pimcoredatahubfileexport/js/workspaces/object.js',
  38.         ];
  39.     }
  40.     /**
  41.      * @return array
  42.      */
  43.     public function getCssPaths()
  44.     {
  45.         return [
  46.             '/bundles/pimcoredatahubfileexport/css/icons.css',
  47.         ];
  48.     }
  49.     public function getInstaller()
  50.     {
  51.         return $this->container->get(Installer::class);
  52.     }
  53.     /**
  54.      * @param ContainerBuilder $container
  55.      */
  56.     public function build(ContainerBuilder $container)
  57.     {
  58.         $container
  59.             ->addCompilerPass(new ExportTypeDefinitionPass())
  60.             ->addCompilerPass(new ExportTransmitterDefinitionPass());
  61.     }
  62.     /**
  63.      * Register bundles to collection.
  64.      *
  65.      * WARNING: this method will be called as soon as this bundle is added to the collection, independent if
  66.      * it will finally be included due to environment restrictions. If you need to load your dependencies conditionally,
  67.      * specify the environments to use on the collection item.
  68.      *
  69.      * @param BundleCollection $collection
  70.      */
  71.     public static function registerDependentBundles(BundleCollection $collection)
  72.     {
  73.         $collection->addBundle(PimcoreDataHubBundle::class, 20);
  74.         $collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
  75.     }
  76.     /**
  77.      * @return string
  78.      */
  79.     public function getBundleLicenseId(): string
  80.     {
  81.         return 'DSF';
  82.     }
  83.     /**
  84.      * Returns the composer package name used to resolve the version
  85.      *
  86.      * @return string
  87.      */
  88.     protected function getComposerPackageName(): string
  89.     {
  90.         return 'pimcore/data-hub-file-export';
  91.     }
  92. }