You are here

public function LegacyConstraintViolationBuilder::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/LegacyConstraintViolationBuilder.php, line 84

Class

LegacyConstraintViolationBuilder
Backwards-compatible implementation of {@link ConstraintViolationBuilderInterface}.

Namespace

Symfony\Component\Validator\Violation

Code

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