ConstraintViolationBuilder
class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface
Default implementation of {@link ConstraintViolationBuilderInterface}.
Methods
No description
Stores the property path at which the violation should be generated.
Sets a parameter to be inserted into the violation message.
Sets all parameters to be inserted into the violation message.
Sets the translation domain which should be used for translating the violation message.
Sets the invalid value that caused this violation.
Sets the number which determines how the plural form of the violation message is chosen when it is translated.
Sets the violation code.
Sets the cause of the violation.
Adds the violation to the current execution context.
Details
__construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, $translator, $translationDomain = null)
$this
atPath(string $path)
Stores the property path at which the violation should be generated.
The passed path will be appended to the current property path of the execution context.
$this
setParameter(string $key, string $value)
Sets a parameter to be inserted into the violation message.
$this
setParameters(array $parameters)
Sets all parameters to be inserted into the violation message.
$this
setTranslationDomain(string $translationDomain)
Sets the translation domain which should be used for translating the violation message.