public EntityConstraintViolationList::getEntityViolations()
Gets violations flagged on entity level, not associated with any field.
\Drupal\Core\Entity\EntityConstraintViolationListInterface A list of violations on the entity level.
Overrides EntityConstraintViolationListInterface::getEntityViolations
public function getEntityViolations() { $this->groupViolationOffsets(); $violations = []; foreach ($this->entityViolationOffsets as $offset) { $violations[] = $this->get($offset); } return new static($this->entity, $violations); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityConstraintViolationList.php/function/EntityConstraintViolationList::getEntityViolations/8.1.x