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/findOrCreateFolder.js',
  69.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/location/noChange.js',
  70.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/location/doNotCreate.js',
  71.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/publish/alwaysPublish.js',
  72.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/publish/attributeBased.js',
  73.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/publish/noChangePublishNew.js',
  74.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/resolver/publish/noChangeUnpublishNew.js',
  75.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/mappingConfiguration.js',
  76.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/mappingConfigurationItem.js',
  77.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/transformationResultHandler.js',
  78.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/datatarget/direct.js',
  79.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/datatarget/manyToManyRelation.js',
  80.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/datatarget/classificationstore.js',
  81.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/datatarget/classificationstoreBatch.js',
  82.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/tools/classificationStoreKeySearchWindow.js',
  83.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/abstractOperator.js',
  84.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/trim.js',
  85.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/numeric.js',
  86.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/asArray.js',
  87.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/asCountries.js',
  88.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/asGeopoint.js',
  89.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/asGeobounds.js',
  90.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/asGeopolygon.js',
  91.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/asGeopolyline.js',
  92.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/asColor.js',
  93.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/explode.js',
  94.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/combine.js',
  95.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/htmlDecode.js',
  96.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/quantityValue.js',
  97.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/quantityValueArray.js',
  98.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/inputQuantityValue.js',
  99.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/inputQuantityValueArray.js',
  100.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/boolean.js',
  101.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/date.js',
  102.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/importAsset.js',
  103.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/loadAsset.js',
  104.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/gallery.js',
  105.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/imageAdvanced.js',
  106.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/loadDataObject.js',
  107.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/reduceArrayKeyValuePairs.js',
  108.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/flattenArray.js',
  109.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/staticText.js',
  110.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/conditionalConversion.js',
  111.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/mapping/operator/stringReplace.js',
  112.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/execution.js',
  113.             '/bundles/pimcoredataimporter/js/pimcore/configuration/components/logTab.js',
  114.         ];
  115.     }
  116.     public function build(ContainerBuilder $container)
  117.     {
  118.         $container
  119.             ->addCompilerPass(new MappingConfigurationFactoryPass())
  120.             ->addCompilerPass(new ResolverConfigurationFactoryPass())
  121.             ->addCompilerPass(new LoaderConfigurationFactoryPass())
  122.             ->addCompilerPass(new InterpreterConfigurationFactoryPass())
  123.             ->addCompilerPass(new CleanupStrategyConfigurationFactoryPass())
  124.         ;
  125.     }
  126.     public static function registerDependentBundles(BundleCollection $collection)
  127.     {
  128.         $collection->addBundle(new FlysystemBundle());
  129.     }
  130.     public function getInstaller()
  131.     {
  132.         return $this->container->get(Installer::class);
  133.     }
  134. }