public function ConstraintViolationList::get in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/ConstraintViolationList.php \Symfony\Component\Validator\ConstraintViolationList::get()
Returns the violation at a given offset.
Parameters
int $offset The offset of the violation.:
Return value
ConstraintViolationInterface The violation.
Throws
\OutOfBoundsException If the offset does not exist.
Overrides ConstraintViolationListInterface::get
4 calls to ConstraintViolationList::get()
- ConstraintViolationList::offsetGet in vendor/
symfony/ validator/ ConstraintViolationList.php - EntityConstraintViolationList::filterByFields in core/
lib/ Drupal/ Core/ Entity/ EntityConstraintViolationList.php - Filters this violation list by the given fields.
- EntityConstraintViolationList::getByFields in core/
lib/ Drupal/ Core/ Entity/ EntityConstraintViolationList.php - Gets the violations of the given fields.
- EntityConstraintViolationList::getEntityViolations in core/
lib/ Drupal/ Core/ Entity/ EntityConstraintViolationList.php - Gets violations flagged on entity level, not associated with any field.
File
- vendor/
symfony/ validator/ ConstraintViolationList.php, line 75
Class
- ConstraintViolationList
- Default implementation of {@ConstraintViolationListInterface}.
Namespace
Symfony\Component\ValidatorCode
public function get($offset) {
if (!isset($this->violations[$offset])) {
throw new \OutOfBoundsException(sprintf('The offset "%s" does not exist.', $offset));
}
return $this->violations[$offset];
}