1 | <?php |
||
14 | class UniqueDataTransferObject extends Constraint |
||
15 | { |
||
16 | const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f'; |
||
17 | |||
18 | /** @var string */ |
||
19 | public $message = 'This value is already used.'; |
||
20 | |||
21 | /** @var string */ |
||
22 | public $service = 'unique_data_transfer_object'; |
||
23 | |||
24 | /** @var EntityManagerInterface|null */ |
||
25 | public $em = null; |
||
26 | |||
27 | /** @var mixed|null */ |
||
28 | public $entityClass = null; |
||
29 | |||
30 | /** @var string */ |
||
31 | public $repositoryMethod = 'findBy'; |
||
32 | |||
33 | /** @var array */ |
||
34 | public $fields = array(); |
||
35 | |||
36 | /** @var string|null */ |
||
37 | public $errorPath = null; |
||
38 | |||
39 | /** @var bool */ |
||
40 | public $ignoreNull = true; |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | protected static $errorNames = array( |
||
46 | self::NOT_UNIQUE_ERROR => 'NOT_UNIQUE_ERROR', |
||
47 | ); |
||
48 | |||
49 | public function getRequiredOptions(): array |
||
53 | |||
54 | /** |
||
55 | * The validator must be defined as a service with this name. |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | public function validatedBy(): string |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function getTargets() |
||
71 | |||
72 | public function getDefaultOption(): string |
||
76 | } |
||
77 |