Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
UniqueReferenceConstraint
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3namespace Drupal\crm\Plugin\Validation\Constraint;
4
5use Symfony\Component\Validator\Constraint;
6
7/**
8 * Entity Reference unique reference constraint.
9 *
10 * Verifies that referenced entities referenced only once.
11 *
12 * @Constraint(
13 *   id = "UniqueReference",
14 *   label = @Translation("Unique Entity Reference reference", context = "Validation")
15 * )
16 */
17class UniqueReferenceConstraint extends Constraint {
18
19  /**
20   * The default violation message.
21   *
22   * @var string
23   */
24  public $message = 'A @entity_type with @field_name referencing entity with ID @id already exists.';
25
26}