You are here

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\Validator

Code

public function setTranslator(TranslatorInterface $translator) {
  $this->translator = $translator;
  return $this;
}