function EntityConstraintViolationListInterface::getByFields

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/EntityConstraintViolationListInterface.php \Drupal\Core\Entity\EntityConstraintViolationListInterface::getByFields()
  2. 10 core/lib/Drupal/Core/Entity/EntityConstraintViolationListInterface.php \Drupal\Core\Entity\EntityConstraintViolationListInterface::getByFields()
  3. 11.x core/lib/Drupal/Core/Entity/EntityConstraintViolationListInterface.php \Drupal\Core\Entity\EntityConstraintViolationListInterface::getByFields()

Gets the violations of the given fields.

When violations should be displayed for a sub-set of visible fields only, this method may be used to filter the set of visible violations first.

Parameters

string[] $field_names: The names of the fields to get violations for.

Return value

\Drupal\Core\Entity\EntityConstraintViolationListInterface A list of violations of the given fields.

1 method overrides EntityConstraintViolationListInterface::getByFields()
EntityConstraintViolationList::getByFields in core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php
Gets the violations of the given fields.

File

core/lib/Drupal/Core/Entity/EntityConstraintViolationListInterface.php, line 48

Class

EntityConstraintViolationListInterface
Interface for the result of entity validation.

Namespace

Drupal\Core\Entity

Code

public function getByFields(array $field_names);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.