ConstraintViolationBuilder::setCode

public ConstraintViolationBuilder::setCode($code)

Sets the violation code.

Parameters

string|null $code The violation code:

Return value

ConstraintViolationBuilderInterface This builder

Overrides ConstraintViolationBuilderInterface::setCode

File

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

Class

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

Namespace

Drupal\Core\TypedData\Validation

Code

public function setCode($code) 
 {
  $this->code = $code;

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

Please login to continue.