ConstraintViolationBuilder::setCause

public ConstraintViolationBuilder::setCause($cause)

Sets the cause of the violation.

Parameters

mixed $cause The cause of the violation:

Return value

ConstraintViolationBuilderInterface This builder

Overrides ConstraintViolationBuilderInterface::setCause

File

core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php, line 206

Class

ConstraintViolationBuilder
Defines a constraint violation builder for the Typed Data validator.

Namespace

Drupal\Core\TypedData\Validation

Code

public function setCause($cause) 
 {
  $this->cause = $cause;

  return $this;
}
doc_Drupal
2016-10-29 08:56:12
Comments
Leave a Comment

Please login to continue.