function EntityConstraintViolationList::getEntityViolations
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::getEntityViolations()
- 10 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::getEntityViolations()
- 11.x core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::getEntityViolations()
Overrides EntityConstraintViolationListInterface::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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.