function ConstraintViolationBuilderInterface::setCause
Sets the cause of the violation.
Parameters
mixed $cause The cause of the violation:
Return value
$this
2 methods override ConstraintViolationBuilderInterface::setCause()
- ConstraintViolationBuilder::setCause in core/
lib/ Drupal/ Core/ Validation/ ConstraintViolationBuilder.php - Sets the cause of the violation.
- ConstraintViolationBuilder::setCause in vendor/
symfony/ validator/ Violation/ ConstraintViolationBuilder.php - Sets the cause of the violation.
File
-
vendor/
symfony/ validator/ Violation/ ConstraintViolationBuilderInterface.php, line 111
Class
- ConstraintViolationBuilderInterface
- Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} objects.
Namespace
Symfony\Component\Validator\ViolationCode
public function setCause(mixed $cause) : static;