Interface for the result of entity validation.
The Symfony violation list is extended with methods that allow filtering violations by fields and field access. Forms leverage that to skip possibly pre-existing violations that cannot be caused or fixed by the form.
Name | Modifiers | Type | Description |
---|---|---|---|
ConstraintViolationListInterface::add | public | function | Adds a constraint violation to this list. |
ConstraintViolationListInterface::addAll | public | function | Merges an existing violation list into this list. |
ConstraintViolationListInterface::get | public | function | Returns the violation at a given offset. |
ConstraintViolationListInterface::has | public | function | Returns whether the given offset exists. |
ConstraintViolationListInterface::remove | public | function | Removes a violation at a given offset. |
ConstraintViolationListInterface::set | public | function | Sets a violation at a given offset. |
EntityConstraintViolationListInterface::filterByFieldAccess | public | function | Filters this violation list to apply for accessible fields only. |
EntityConstraintViolationListInterface::filterByFields | public | function | Filters this violation list by the given fields. |
EntityConstraintViolationListInterface::getByField | public | function | Gets the violations of the given field. |
EntityConstraintViolationListInterface::getByFields | public | function | Gets the violations of the given fields. |
EntityConstraintViolationListInterface::getEntity | public | function | The entity which has been validated. |
EntityConstraintViolationListInterface::getEntityViolations | public | function | Gets violations flagged on entity level, not associated with any field. |
EntityConstraintViolationListInterface::getFieldNames | public | function | Returns the names of all violated fields. |
© 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!EntityConstraintViolationListInterface.php/interface/EntityConstraintViolationListInterface/8.1.x