ViolationMapper
in package
implements
ViolationMapperInterface
Tags
Interfaces, Classes, Traits and Enums
Table of Contents
- $allowNonSynchronized : bool
- mapViolation() : mixed
- Maps a constraint violation to a form in the form tree under the given form.
- acceptsErrors() : bool
- matchChild() : FormInterface|null
- Tries to match the beginning of the property path at the current position against the children of the scope.
- reconstructPath() : RelativePath|null
- Reconstructs a property path from a violation path and a form tree.
Properties
$allowNonSynchronized
private
bool
$allowNonSynchronized
Methods
mapViolation()
Maps a constraint violation to a form in the form tree under the given form.
public
mapViolation(ConstraintViolation $violation, FormInterface $form[, mixed $allowNonSynchronized = false ]) : mixed
Parameters
- $violation : ConstraintViolation
- $form : FormInterface
- $allowNonSynchronized : mixed = false
-
Whether to allow mapping to non-synchronized forms
Return values
mixed —acceptsErrors()
private
acceptsErrors(FormInterface $form) : bool
Parameters
- $form : FormInterface
Return values
bool —matchChild()
Tries to match the beginning of the property path at the current position against the children of the scope.
private
matchChild(FormInterface $form, PropertyPathIteratorInterface $it) : FormInterface|null
If a matching child is found, it is returned. Otherwise null is returned.
Parameters
- $form : FormInterface
- $it : PropertyPathIteratorInterface
Return values
FormInterface|null —reconstructPath()
Reconstructs a property path from a violation path and a form tree.
private
reconstructPath(ViolationPath $violationPath, FormInterface $origin) : RelativePath|null
Parameters
- $violationPath : ViolationPath
- $origin : FormInterface