/**
* {@inheritdoc}
*
* @param \Drupal\Core\Entity\FieldableEntityInterface $entity
* The entity that has been validated.
* @param array $violations
* The array of violations.
*/
public function __construct(FieldableEntityInterface $entity, array $violations = array())
{
parent::__construct($violations);
$this->entity = $entity;
}