You are here

public function EntityConstraintViolationList::add in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::add()

Adds a constraint violation to this list.

Parameters

ConstraintViolationInterface $violation The violation to add.:

Overrides ConstraintViolationList::add

1 call to EntityConstraintViolationList::add()
EntityConstraintViolationList::filterByFields in core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php
Filters this violation list by the given fields.

File

core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php, line 191
Contains \Drupal\Core\Entity\EntityConstraintViolationList.

Class

EntityConstraintViolationList
Implements an entity constraint violation list.

Namespace

Drupal\Core\Entity

Code

public function add(ConstraintViolationInterface $violation) {
  parent::add($violation);
  $this->violationOffsetsByField = NULL;
  $this->entityViolationOffsets = NULL;
}