ConstraintViolationBuilder::setParameter

public ConstraintViolationBuilder::setParameter($key, $value)

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

core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php, line 146

Class

ConstraintViolationBuilder
Defines a constraint violation builder for the Typed Data validator.

Namespace

Drupal\Core\TypedData\Validation

Code

1
2
3
4
5
6
public function setParameter($key, $value)
 {
  $this->parameters[$key] = $value;
 
  return $this;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.