You are here

public function LegacyConstraintViolationBuilder::setCause in Plug 7

Sets the cause of the violation.

Parameters

mixed $cause The cause of the violation:

Return value

ConstraintViolationBuilderInterface This builder

Overrides ConstraintViolationBuilderInterface::setCause

File

lib/Symfony/validator/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php, line 144

Class

LegacyConstraintViolationBuilder
Backwards-compatible implementation of {@link ConstraintViolationBuilderInterface}.

Namespace

Symfony\Component\Validator\Violation

Code

public function setCause($cause) {

  // do nothing - we can't save the cause through the old API
  return $this;
}