getMessageTemplate() public method

Returns the error message template
public getMessageTemplate ( ) : string
return string
 private function getErrorMessage(FormError $error)
 {
     if (null !== $error->getMessagePluralization()) {
         return $this->translator->transChoice($error->getMessageTemplate(), $error->getMessagePluralization(), $error->getMessageParameters(), 'validators');
     }
     return $this->translator->trans($error->getMessageTemplate(), $error->getMessageParameters(), 'validators');
 }
Example #2
0
 public static function formatErrors(FormError $error)
 {
     return $error->getMessageTemplate();
 }
Example #3
0
 private function getErrorMessage(FormError $error)
 {
     return $this->translator->trans($error->getMessageTemplate(), $error->getMessageParameters(), 'validators');
 }