<?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\AdminBundle\PimcoreAdminBundle;
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\Installer\InstallerInterface;
use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface;
use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait;
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, PimcoreBundleAdminClassicInterface
{
use BundleAdminClassicTrait;
use PackageVersionTrait;
const LOGGER_COMPONENT_PREFIX = 'FileExport :: ';
public function getJsPaths(): array
{
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(): array
{
return [
'/bundles/pimcoredatahubfileexport/css/icons.css',
];
}
public function getInstaller(): ?InstallerInterface
{
return $this->container->get(Installer::class);
}
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): void
{
$collection->addBundle(PimcoreDataHubBundle::class, 20);
$collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
$collection->addBundle(new PimcoreAdminBundle(), 60);
if (\Pimcore\Version::getMajorVersion() >= 11) {
$collection->addBundle(\Pimcore\Bundle\ApplicationLoggerBundle\PimcoreApplicationLoggerBundle::class);
}
}
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';
}
}