You are here

public function ConstraintViolationBuilder::setParameter in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/Violation/ConstraintViolationBuilder.php \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setParameter()
  2. 8 core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php \Drupal\Core\TypedData\Validation\ConstraintViolationBuilder::setParameter()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Violation/ConstraintViolationBuilder.php \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setParameter()

Sets a parameter to be inserted into the violation message.

Parameters

string $key The name of the parameter:

string $value The value to be inserted in the parameter's place:

Return value

ConstraintViolationBuilderInterface This builder

Overrides ConstraintViolationBuilderInterface::setParameter

File

vendor/symfony/validator/Violation/ConstraintViolationBuilder.php, line 118

Class

ConstraintViolationBuilder
Default implementation of {@link ConstraintViolationBuilderInterface}.

Namespace

Symfony\Component\Validator\Violation

Code

public function setParameter($key, $value) {
  $this->parameters[$key] = $value;
  return $this;
}