function EntityConstraintViolationList::set

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::set()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::set()
  3. 10 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::set()

File

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

Class

EntityConstraintViolationList
Implements an entity constraint violation list.

Namespace

Drupal\Core\Entity

Code

public function set($offset, ConstraintViolationInterface $violation) : void {
    parent::set($offset, $violation);
    $this->violationOffsetsByField = NULL;
    $this->entityViolationOffsets = NULL;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.