mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-22 19:16:11 +01:00
Daniel Siepmann
a9f3f108e3
The vendor was renamed from `wrm` to `werkraummedia`. And the namespace vendor was renamed from `Wrm` to `WerkraumMedia`. That way all references to PHP classes as well as the package name itself need to be adjusted.
24 lines
1.1 KiB
PHP
24 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace WerkraumMedia\Events;
|
|
|
|
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
use WerkraumMedia\Events\Service\DestinationDataImportService\Slugger\Registry;
|
|
use WerkraumMedia\Events\Service\DestinationDataImportService\Slugger\SluggerType;
|
|
|
|
return static function (ContainerConfigurator $container, ContainerBuilder $containerBuilder) {
|
|
$containerBuilder->registerForAutoconfiguration(SluggerType::class)->addTag('tx_events.slugger_type');
|
|
$containerBuilder->addCompilerPass(new class() implements CompilerPassInterface {
|
|
public function process(ContainerBuilder $container): void
|
|
{
|
|
$registry = $container->getDefinition(Registry::class);
|
|
foreach (array_keys($container->findTaggedServiceIds('tx_events.slugger_type')) as $serviceId) {
|
|
$registry->addMethodCall('add', [$container->getDefinition($serviceId)]);
|
|
}
|
|
}
|
|
});
|
|
};
|