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