function InternalViolation::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Field/InternalViolation.php \Drupal\Core\Field\InternalViolation::__construct()
- 11.x core/lib/Drupal/Core/Field/InternalViolation.php \Drupal\Core\Field\InternalViolation::__construct()
Constructs a InternalViolation object.
Parameters
\Symfony\Component\Validator\ConstraintViolationInterface $violation: The violation to wrap.
File
-
core/
lib/ Drupal/ Core/ Field/ InternalViolation.php, line 42
Class
- InternalViolation
- Wraps a violation to allow arrayPropertyPath to be deprecated.
Namespace
Drupal\Core\FieldCode
public function __construct(ConstraintViolationInterface $violation) {
$this->violation = $violation;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.