<?php
/**
* Pimcore
*
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license PCL
*/
namespace Pimcore\Bundle\DataHubFileExportBundle;
use Pimcore\Bundle\DataHubBundle\PimcoreDataHubBundle;
use Pimcore\Bundle\DataHubFileExportBundle\DependencyInjection\Compiler\ExportTransmitterDefinitionPass;
use Pimcore\Bundle\DataHubFileExportBundle\DependencyInjection\Compiler\ExportTypeDefinitionPass;
use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Bundle\EnterpriseBundleInterface;
use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class PimcoreDataHubFileExportBundle extends AbstractPimcoreBundle implements DependentBundleInterface, EnterpriseBundleInterface
{
use PackageVersionTrait;
public function getJsPaths()
{
return [
'/bundles/pimcoredatahubfileexport/js/pimcore/startup.js',
'/bundles/pimcoredatahubfileexport/js/adapter/fileExport.js',
'/bundles/pimcoredatahubfileexport/js/configuration/abstractConfigItem.js',
'/bundles/pimcoredatahubfileexport/js/configuration/gridConfigDialog.js',
'/bundles/pimcoredatahubfileexport/js/configuration/configEvents.js',
'/bundles/pimcoredatahubfileexport/js/configuration/fileExport/configItem.js',
'/bundles/pimcoredatahubfileexport/js/configuration/fileExport/execution.js',
'/bundles/pimcoredatahubfileexport/js/configuration/fileExport/logTab.js',
'/bundles/pimcoredatahubfileexport/js/configuration/fileExport/transmitter.js',
'/bundles/pimcoredatahubfileexport/js/workspaces/object.js',
];
}
/**
* @return array
*/
public function getCssPaths()
{
return [
'/bundles/pimcoredatahubfileexport/css/icons.css',
];
}
public function getInstaller()
{
return $this->container->get(Installer::class);
}
/**
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container)
{
$container
->addCompilerPass(new ExportTypeDefinitionPass())
->addCompilerPass(new ExportTransmitterDefinitionPass());
}
/**
* Register bundles to collection.
*
* WARNING: this method will be called as soon as this bundle is added to the collection, independent if
* it will finally be included due to environment restrictions. If you need to load your dependencies conditionally,
* specify the environments to use on the collection item.
*
* @param BundleCollection $collection
*/
public static function registerDependentBundles(BundleCollection $collection)
{
$collection->addBundle(PimcoreDataHubBundle::class, 20);
$collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
}
/**
* @return string
*/
public function getBundleLicenseId(): string
{
return 'DSF';
}
/**
* Returns the composer package name used to resolve the version
*
* @return string
*/
protected function getComposerPackageName(): string
{
return 'pimcore/data-hub-file-export';
}
}