[FrameworkBundle] simplified some code
This commit is contained in:
parent
40dec8831f
commit
935c82e1f9
@ -29,9 +29,6 @@ class AddConstraintValidatorsPass implements CompilerPassInterface
|
||||
}
|
||||
}
|
||||
|
||||
$definition = $container->getDefinition('validator.validator_factory');
|
||||
$arguments = $definition->getArguments();
|
||||
$arguments[1] = $validators;
|
||||
$definition->setArguments($arguments);
|
||||
$container->getDefinition('validator.validator_factory')->setArgument(1, $validators);
|
||||
}
|
||||
}
|
@ -33,9 +33,6 @@ class AddFieldFactoryGuessersPass implements CompilerPassInterface
|
||||
return new Reference($id);
|
||||
}, array_keys($container->findTaggedServiceIds('form.field_factory.guesser')));
|
||||
|
||||
$definition = $container->getDefinition('form.field_factory');
|
||||
$arguments = $definition->getArguments();
|
||||
$arguments[0] = $guessers;
|
||||
$definition->setArguments($arguments);
|
||||
$container->getDefinition('form.field_factory')->setArgument(0, $guessers);
|
||||
}
|
||||
}
|
@ -35,9 +35,6 @@ class AddSecurityVotersPass implements CompilerPassInterface
|
||||
return new Reference($id);
|
||||
}, array_keys($container->findTaggedServiceIds('security.voter')));
|
||||
|
||||
$definition = $container->getDefinition('security.access.decision_manager');
|
||||
$arguments = $definition->getArguments();
|
||||
$arguments[0] = $voters;
|
||||
$definition->setArguments($arguments);
|
||||
$container->getDefinition('security.access.decision_manager')->setArgument(0, $voters);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user