public function EntityConstraintViolationList::getByField in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php \Drupal\Core\Entity\EntityConstraintViolationList::getByField()
Gets the violations of the given field.
Parameters
string $field_name: The name of the field to get violations for.
Return value
\Symfony\Component\Validator\ConstraintViolationListInterface The violations of the given field.
Overrides EntityConstraintViolationListInterface::getByField
File
- core/
lib/ Drupal/ Core/ Entity/ EntityConstraintViolationList.php, line 99 - Contains \Drupal\Core\Entity\EntityConstraintViolationList.
Class
- EntityConstraintViolationList
- Implements an entity constraint violation list.
Namespace
Drupal\Core\EntityCode
public function getByField($field_name) {
return $this
->getByFields([
$field_name,
]);
}