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; }
Please login to continue.