vendor/pimcore/data-importer/src/PimcoreDataImporterBundle.php line 30

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\DataImporterBundle;
  15. use League\FlysystemBundle\FlysystemBundle;
  16. use Pimcore\Bundle\DataImporterBundle\DependencyInjection\CompilerPass\CleanupStrategyConfigurationFactoryPass;
  17. use Pimcore\Bundle\DataImporterBundle\DependencyInjection\CompilerPass\InterpreterConfigurationFactoryPass;
  18. use Pimcore\Bundle\DataImporterBundle\DependencyInjection\CompilerPass\LoaderConfigurationFactoryPass;
  19. use Pimcore\Bundle\DataImporterBundle\DependencyInjection\CompilerPass\MappingConfigurationFactoryPass;
  20. use Pimcore\Bundle\DataImporterBundle\DependencyInjection\CompilerPass\ResolverConfigurationFactoryPass;
  21. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  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 PimcoreDataImporterBundle extends AbstractPimcoreBundle implements DependentBundleInterface
  27. {
  28.     use PackageVersionTrait;
  29.     const LOGGER_COMPONENT_PREFIX 'DATA-IMPORTER ';
  30.     protected function getComposerPackageName(): string
  31.     {
  32.         return 'pimcore/data-importer';
  33.     }
  34.     public function getCssPaths()
  35.     {
  36.         return [
  37.             '/bundles/pimcoredataimporter/css/icons.css'
  38.         ];
  39.     }
  40.     public function getJsPaths()
  41.     {
  42.         return [
  43.             '/bundles/pimcoredataimporter/js/pimcore/startup.js',
  44.             '/bundles/pimcoredataimporter/js/pimcore/helper/ext_extensions.js',
  45.             '/bundles/pimcoredataimporter/js/pimcore/helper/abstractOptionType.js',
  46.             '/bundles/pimcoredataimporter/js/pimcore/adapter/dataImporterDataObject.js',
  47.             '/bundles/pimcoredataimporter/js/pimcore/configuration/configEvents.js',
  48.             '/bundles/pimcoredataimporter/js/pimcore/configuration/configItemDataObject.js',
  49.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/loader/sftp.js',
  50.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/loader/http.js',
  51.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/loader/asset.js',
  52.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/loader/upload.js',
  53.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/loader/push.js',
  54.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/interpreter/csv.js',
  55.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/interpreter/json.js',
  56.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/interpreter/xlsx.js',
  57.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/interpreter/xml.js',
  58.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/cleanup/unpublish.js',
  59.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/cleanup/delete.js',
  60.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/importSettings.js',
  61.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/importPreview.js',
  62.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/load/id.js',
  63.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/load/path.js',
  64.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/load/attribute.js',
  65.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/load/notLoad.js',
  66.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/location/staticPath.js',
  67.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/location/findParent.js',
  68.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/location/noChange.js',
  69.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/publish/alwaysPublish.js',
  70.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/publish/attributeBased.js',
  71.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/publish/noChangePublishNew.js',
  72.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/publish/noChangeUnpublishNew.js',
  73.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/mappingConfiguration.js',
  74.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/mappingConfigurationItem.js',
  75.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/transformationResultHandler.js',
  76.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/datatarget/direct.js',
  77.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/datatarget/classificationstore.js',
  78.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/datatarget/classificationstoreBatch.js',
  79.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/tools/classificationStoreKeySearchWindow.js',
  80.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/abstractOperator.js',
  81.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/trim.js',
  82.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/numeric.js',
  83.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/asArray.js',
  84.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/explode.js',
  85.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/combine.js',
  86.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/htmlDecode.js',
  87.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/quantityValue.js',
  88.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/quantityValueArray.js',
  89.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/inputQuantityValue.js',
  90.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/inputQuantityValueArray.js',
  91.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/boolean.js',
  92.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/date.js',
  93.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/importAsset.js',
  94.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/loadAsset.js',
  95.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/gallery.js',
  96.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/imageAdvanced.js',
  97.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/loadDataObject.js',
  98.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/reduceArrayKeyValuePairs.js',
  99.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/flattenArray.js',
  100.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/staticText.js',
  101.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/conditionalConversion.js',
  102.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/execution.js',
  103.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/logTab.js',
  104.         ];
  105.     }
  106.     public function build(ContainerBuilder $container)
  107.     {
  108.         $container
  109.             ->addCompilerPass(new MappingConfigurationFactoryPass())
  110.             ->addCompilerPass(new ResolverConfigurationFactoryPass())
  111.             ->addCompilerPass(new LoaderConfigurationFactoryPass())
  112.             ->addCompilerPass(new InterpreterConfigurationFactoryPass())
  113.             ->addCompilerPass(new CleanupStrategyConfigurationFactoryPass())
  114.         ;
  115.     }
  116.     public static function registerDependentBundles(BundleCollection $collection)
  117.     {
  118.         $collection->addBundle(new FlysystemBundle());
  119.     }
  120. }