You are here

public function ConstraintViolationBuilderInterface::setCode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php \Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface::setCode()

Sets the violation code.

Parameters

int $code The violation code:

Return value

ConstraintViolationBuilderInterface This builder

3 methods override ConstraintViolationBuilderInterface::setCode()
ConstraintViolationBuilder::setCode in vendor/symfony/validator/Violation/ConstraintViolationBuilder.php
Sets the violation code.
ConstraintViolationBuilder::setCode in core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php
Sets the violation code.
LegacyConstraintViolationBuilder::setCode in vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php
Sets the violation code.

File

vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php, line 101

Class

ConstraintViolationBuilderInterface
Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} objects.

Namespace

Symfony\Component\Validator\Violation

Code

public function setCode($code);