1515
1616use MonsieurBiz \SyliusRichEditorPlugin \Exception \UiElementNotFoundException ;
1717use MonsieurBiz \SyliusRichEditorPlugin \UiElement \RegistryInterface ;
18- use MonsieurBiz \SyliusRichEditorPlugin \Uploader \FileUploader ;
18+ use MonsieurBiz \SyliusRichEditorPlugin \Uploader \FileUploaderInterface ;
1919use Symfony \Bundle \FrameworkBundle \Controller \AbstractController ;
2020use Symfony \Component \Form \Extension \Core \Type \FileType as NativeFileType ;
2121use Symfony \Component \Form \FormInterface ;
@@ -122,7 +122,7 @@ public function renderElementsAction(Request $request): Response
122122 /**
123123 * Validate submitted data and return an UI Element JSON if everything is OK.
124124 */
125- public function submitAction (Request $ request , FileUploader $ fileUploader , string $ code , bool $ isEdition ): Response
125+ public function submitAction (Request $ request , FileUploaderInterface $ fileUploader , string $ code , bool $ isEdition ): Response
126126 {
127127 // Find UI Element from type
128128 try {
@@ -181,7 +181,7 @@ public function submitAction(Request $request, FileUploader $fileUploader, strin
181181 *
182182 * @return array|mixed|string
183183 */
184- private function processFormData (FormInterface $ form , FileUploader $ fileUploader , $ requestData )
184+ private function processFormData (FormInterface $ form , FileUploaderInterface $ fileUploader , $ requestData )
185185 {
186186 // No child, end of recursivity, return form value or uploaded file path
187187 if (!\count ($ form ->all ())) {
@@ -202,7 +202,7 @@ private function processFormData(FormInterface $form, FileUploader $fileUploader
202202 *
203203 * @return array|mixed|string
204204 */
205- private function processFormDataWithoutChild (FormInterface $ form , FileUploader $ fileUploader , $ requestData )
205+ private function processFormDataWithoutChild (FormInterface $ form , FileUploaderInterface $ fileUploader , $ requestData )
206206 {
207207 if ($ form ->isValid () && $ form ->getData () instanceof UploadedFile) {
208208 // Upload image selected by user
0 commit comments