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. 11.x core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::set()

phpcs:ignore Drupal.Commenting.FunctionComment.VoidReturn

Return value

void

File

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

Class

EntityConstraintViolationList
Implements an entity constraint violation list.

Namespace

Drupal\Core\Entity

Code

public function set($offset, ConstraintViolationInterface $violation) {
    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.