Skip to content
Snippets Groups Projects
Commit dd0c49dc authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2303703 by dawehner: Remove unused RegisterParamConvertersPass.

parent 6a0ea496
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
<?php
/**
* @file
* Contains Drupal\Core\DependencyInjection\Compiler\RegisterParamConvertersPass.
*/
namespace Drupal\Core\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Reference;
/**
* Registers EntityConverter services with the ParamConverterManager.
*/
class RegisterParamConvertersPass implements CompilerPassInterface {
/**
* Adds services tagged with "paramconverter" to the param converter service.
*
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* The container to process.
*/
public function process(ContainerBuilder $container) {
if (!$container->hasDefinition('paramconverter_manager')) {
return;
}
$manager = $container->getDefinition('paramconverter_manager');
foreach ($container->findTaggedServiceIds('paramconverter') as $id => $attributes) {
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
$manager->addMethodCall('addConverter', array($id, $priority));
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment