You are here

public function EntityConstraintViolationListInterface::filterByFields in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityConstraintViolationListInterface.php \Drupal\Core\Entity\EntityConstraintViolationListInterface::filterByFields()

Filters this violation list by the given fields.

The returned object just has violations attached to the provided 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 filter violations for.

Return value

$this

1 method overrides EntityConstraintViolationListInterface::filterByFields()
EntityConstraintViolationList::filterByFields in core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php
Filters this violation list by the given fields.

File

core/lib/Drupal/Core/Entity/EntityConstraintViolationListInterface.php, line 68
Contains \Drupal\Core\Entity\EntityConstraintViolationListInterface.

Class

EntityConstraintViolationListInterface
Interface for the result of entity validation.

Namespace

Drupal\Core\Entity

Code

public function filterByFields(array $field_names);