You are here

public function EntityConstraintViolationList::getFieldNames in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::getFieldNames()

Returns the names of all violated fields.

Return value

string[] An array of field names.

Overrides EntityConstraintViolationListInterface::getFieldNames

1 call to EntityConstraintViolationList::getFieldNames()
EntityConstraintViolationList::filterByFieldAccess in core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php
Filters this violation list to apply for accessible fields only.

File

core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php, line 176

Class

EntityConstraintViolationList
Implements an entity constraint violation list.

Namespace

Drupal\Core\Entity

Code

public function getFieldNames() {
  $this
    ->groupViolationOffsets();
  return array_keys($this->violationOffsetsByField);
}