public function ConstraintViolationBuilder::__construct

public ConstraintViolationBuilder::__construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null)

Constructs a new ConstraintViolationBuilder instance.

Parameters

\Symfony\Component\Validator\ConstraintViolationList $violations: The violation list.

\Symfony\Component\Validator\Constraint $constraint: The constraint.

string $message: The message.

array $parameters: The message parameters.

mixed $root: The root.

string $propertyPath: The property string.

mixed $invalidValue: The invalid value.

\Drupal\Core\Validation\TranslatorInterface $translator: The translator.

null $translationDomain: (optional) The translation domain.

File

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

Class

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

Namespace

Drupal\Core\TypedData\Validation

Code

public function __construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null) 
 {
  $this->violations = $violations;
  $this->message = $message;
  $this->parameters = $parameters;
  $this->root = $root;
  $this->propertyPath = $propertyPath;
  $this->invalidValue = $invalidValue;
  $this->translator = $translator;
  $this->translationDomain = $translationDomain;
  $this->constraint = $constraint;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!TypedData!Validation!ConstraintViolationBuilder.php/function/ConstraintViolationBuilder::__construct/8.1.x