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

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