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