public function ValidatorBuilder::setTranslator in Plug 7
Sets the translator used for translating violation messages.
Parameters
TranslatorInterface $translator The translator instance:
Return value
ValidatorBuilderInterface The builder object
Overrides ValidatorBuilderInterface::setTranslator
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ ValidatorBuilder.php, line 286
Class
- ValidatorBuilder
- The default implementation of {@link ValidatorBuilderInterface}.
Namespace
Symfony\Component\ValidatorCode
public function setTranslator(TranslatorInterface $translator) {
$this->translator = $translator;
return $this;
}