function ExecutionContext::buildViolation

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php \Drupal\Core\TypedData\Validation\ExecutionContext::buildViolation()
  2. 8.9.x core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php \Drupal\Core\TypedData\Validation\ExecutionContext::buildViolation()
  3. 10 core/lib/Drupal/Core/Validation/ExecutionContext.php \Drupal\Core\Validation\ExecutionContext::buildViolation()

File

core/lib/Drupal/Core/Validation/ExecutionContext.php, line 121

Class

ExecutionContext
Defines an execution context class.

Namespace

Drupal\Core\Validation

Code

public function buildViolation(string $message, array $parameters = []) : ConstraintViolationBuilderInterface {
    return new ConstraintViolationBuilder($this->violations, $this->constraint, $message, $parameters, $this->root, $this->propertyPath, $this->value, $this->translator, $this->translationDomain);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.