<?php declare(strict_types=1);
namespace Stutt\Redirects;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Kernel;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
class StuttRedirects extends Plugin
{
public function build(ContainerBuilder $container): void
{
parent::build($container);
$activePlugins = $container->getParameter('kernel.active_plugins');
if (!isset($activePlugins[\SwagMigrationAssistant\SwagMigrationAssistant::class])) {
return;
}
// Only load migration relevant classes if the SwagMigrationAssistant is available
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/DependencyInjection/'));
$loader->load('migration_assistant_extension.xml');
}
}