public function ValidatorBuilder::setTranslator in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/ValidatorBuilder.php \Symfony\Component\Validator\ValidatorBuilder::setTranslator()
Sets the translator used for translating violation messages.
Parameters
TranslatorInterface $translator The translator instance:
Return value
ValidatorBuilderInterface The builder object
Overrides ValidatorBuilderInterface::setTranslator
File
- vendor/
symfony/ validator/ ValidatorBuilder.php, line 278
Class
- ValidatorBuilder
- The default implementation of {@link ValidatorBuilderInterface}.
Namespace
Symfony\Component\ValidatorCode
public function setTranslator(TranslatorInterface $translator) {
$this->translator = $translator;
return $this;
}