public function ConstraintViolationBuilderInterface::setCause in Plug 7
Sets the cause of the violation.
Parameters
mixed $cause The cause of the violation:
Return value
ConstraintViolationBuilderInterface This builder
2 methods override ConstraintViolationBuilderInterface::setCause()
- ConstraintViolationBuilder::setCause in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Violation/ ConstraintViolationBuilder.php - Sets the cause of the violation.
- LegacyConstraintViolationBuilder::setCause in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Violation/ LegacyConstraintViolationBuilder.php - Sets the cause of the violation.
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Violation/ ConstraintViolationBuilderInterface.php, line 109
Class
- ConstraintViolationBuilderInterface
- Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} objects.
Namespace
Symfony\Component\Validator\ViolationCode
public function setCause($cause);