set() public method

Sets a violation at a given offset.
public set ( integer $offset, ConstraintViolation $violation )
$offset integer The violation offset.
$violation ConstraintViolation The violation.
 /**
  * {@inheritdoc}
  */
 public function set($offset, ConstraintViolationInterface $violation)
 {
     parent::set($offset, $violation);
     $this->violationOffsetsByField = NULL;
     $this->entityViolationOffsets = NULL;
 }