public function EntityConstraintViolationList::getEntityViolations in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::getEntityViolations()
- 9 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::getEntityViolations()
File
- core/
lib/ Drupal/ Core/ Entity/ EntityConstraintViolationList.php, line 87
Class
- EntityConstraintViolationList
- Implements an entity constraint violation list.
Namespace
Drupal\Core\EntityCode
public function getEntityViolations() {
$this
->groupViolationOffsets();
$violations = [];
foreach ($this->entityViolationOffsets as $offset) {
$violations[] = $this
->get($offset);
}
return new static($this->entity, $violations);
}