public function ConstraintViolationList::addAll

Merges an existing violation list into this list.

@api

Parameters

ConstraintViolationListInterface $otherList The list to merge.:

Overrides ConstraintViolationListInterface::addAll

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/ConstraintViolationList.php, line 65

Class

ConstraintViolationList
Default implementation of {@ConstraintViolationListInterface}.

Namespace

Symfony\Component\Validator

Code

public function addAll(ConstraintViolationListInterface $otherList) {
  foreach ($otherList as $violation) {
    $this->violations[] = $violation;
  }
}