You are here

public function EntityConstraintViolationList::__construct in Zircon Profile 8

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

Parameters

\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity that has been validated.

array $violations: The array of violations.

Overrides ConstraintViolationList::__construct

File

core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php, line 55
Contains \Drupal\Core\Entity\EntityConstraintViolationList.

Class

EntityConstraintViolationList
Implements an entity constraint violation list.

Namespace

Drupal\Core\Entity

Code

public function __construct(FieldableEntityInterface $entity, array $violations = array()) {
  parent::__construct($violations);
  $this->entity = $entity;
}