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

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\Installer\InstallerInterface;
  19. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  20. use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
  21. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  22. use Symfony\Component\DependencyInjection\ContainerBuilder;
  23. class PimcoreDataHubFileExportBundle extends AbstractPimcoreBundle implements DependentBundleInterfaceEnterpriseBundleInterface
  24. {
  25.     use PackageVersionTrait;
  26.     /**
  27.      * @return string[]
  28.      */
  29.     public function getJsPaths()
  30.     {
  31.         return [
  32.             '/bundles/pimcoredatahubfileexport/js/pimcore/startup.js',
  33.             '/bundles/pimcoredatahubfileexport/js/adapter/fileExport.js',
  34.             '/bundles/pimcoredatahubfileexport/js/configuration/abstractConfigItem.js',
  35.             '/bundles/pimcoredatahubfileexport/js/configuration/gridConfigDialog.js',
  36.             '/bundles/pimcoredatahubfileexport/js/configuration/configEvents.js',
  37.             '/bundles/pimcoredatahubfileexport/js/configuration/fileExport/configItem.js',
  38.             '/bundles/pimcoredatahubfileexport/js/configuration/fileExport/execution.js',
  39.             '/bundles/pimcoredatahubfileexport/js/configuration/fileExport/logTab.js',
  40.             '/bundles/pimcoredatahubfileexport/js/configuration/fileExport/transmitter.js',
  41.             '/bundles/pimcoredatahubfileexport/js/workspaces/object.js',
  42.         ];
  43.     }
  44.     /**
  45.      * @return array
  46.      */
  47.     public function getCssPaths()
  48.     {
  49.         return [
  50.             '/bundles/pimcoredatahubfileexport/css/icons.css',
  51.         ];
  52.     }
  53.     /**
  54.      * @return object|Installer|InstallerInterface|null
  55.      */
  56.     public function getInstaller()
  57.     {
  58.         return $this->container->get(Installer::class);
  59.     }
  60.     public function build(ContainerBuilder $container)
  61.     {
  62.         $container
  63.             ->addCompilerPass(new ExportTypeDefinitionPass())
  64.             ->addCompilerPass(new ExportTransmitterDefinitionPass());
  65.     }
  66.     /**
  67.      * Register bundles to collection.
  68.      *
  69.      * WARNING: this method will be called as soon as this bundle is added to the collection, independent if
  70.      * it will finally be included due to environment restrictions. If you need to load your dependencies conditionally,
  71.      * specify the environments to use on the collection item.
  72.      *
  73.      * @param BundleCollection $collection
  74.      */
  75.     public static function registerDependentBundles(BundleCollection $collection)
  76.     {
  77.         $collection->addBundle(PimcoreDataHubBundle::class, 20);
  78.         $collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
  79.     }
  80.     public function getBundleLicenseId(): string
  81.     {
  82.         return 'DSF';
  83.     }
  84.     /**
  85.      * Returns the composer package name used to resolve the version
  86.      *
  87.      * @return string
  88.      */
  89.     protected function getComposerPackageName(): string
  90.     {
  91.         return 'pimcore/data-hub-file-export';
  92.     }
  93. }