You are here

public function ConstraintViolationBuilder::setParameter in Plug 7

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

lib/Symfony/validator/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php, line 117

Class

ConstraintViolationBuilder
Default implementation of {@link ConstraintViolationBuilderInterface}.

Namespace

Symfony\Component\Validator\Violation

Code

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