EntityConstraintViolationList::add

public EntityConstraintViolationList::add(ConstraintViolationInterface $violation)

Adds a constraint violation to this list.

Parameters

ConstraintViolationInterface $violation The violation to add.:

Overrides ConstraintViolationList::add

File

core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php, line 186

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;
}
doc_Drupal
2016-10-29 09:04:46
Comments
Leave a Comment

Please login to continue.