1 | <?php |
||
18 | class ImportService |
||
19 | { |
||
20 | /** |
||
21 | * @var EntityManagerInterface |
||
|
|||
22 | */ |
||
23 | protected $entityManager; |
||
24 | |||
25 | /** |
||
26 | * @var TranslatorInterface |
||
27 | */ |
||
28 | protected $translator; |
||
29 | |||
30 | /** |
||
31 | * @var FileParser |
||
32 | */ |
||
33 | private $fileParser; |
||
34 | |||
35 | /** |
||
36 | * @var Validator |
||
37 | */ |
||
38 | private $validator; |
||
39 | |||
40 | /** |
||
41 | * @var Importer |
||
42 | */ |
||
43 | private $importer; |
||
44 | |||
45 | /** |
||
46 | * @param Importer $importer |
||
47 | * @param FileParser $fileParser |
||
48 | * @param Validator $validator |
||
49 | * @param TranslatorInterface $translator |
||
50 | */ |
||
51 | public function __construct( |
||
62 | |||
63 | /** |
||
64 | * Handles submitted form data. |
||
65 | * |
||
66 | * @param UploadFormData $formData |
||
67 | * |
||
68 | * @return HandleFormContext |
||
69 | */ |
||
70 | public function handleFormData(UploadFormData $formData) |
||
106 | |||
107 | /** |
||
108 | * Fetches the line of the constraint violation and returns the line prefix with line number. |
||
109 | * |
||
110 | * @param ConstraintViolationInterface $violation |
||
111 | * |
||
112 | * @return string |
||
113 | */ |
||
114 | private function getTranslatedLinePrefix(ConstraintViolationInterface $violation) |
||
129 | } |
||
130 |