UploaderTrait
Configuration of the shared UploaderDropzone components for IMAGE_UPLOADER and FILE_UPLOADER parameters. Each type has its own child (`imgUploader` / `fileUploader`) with its own temp folder. Upload/remove signals go straight to the child uploader.
Table of Contents
Methods
- getUploaderControlMap() : array<string|int, mixed>
- Overrides the parent {@see \App\UI\Front\Base\Components\ParameterFormComponent\ParameterForm::getUploaderControlMap()}: maps the first IMAGE_UPLOADER to the shared `imgUploader` and the first FILE_UPLOADER to `fileUploader`.
- createComponentFileUploader() : UploaderDropzone
- createComponentImgUploader() : UploaderDropzone
- configureUploaders() : void
- findFirstParameterOfType() : Parameter|null
- parseFileTypes() : array<string|int, string>
- prepareExistingAssets() : array<int, array<string, mixed>>
- prepareExistingFiles() : array<int, array<string, mixed>>
Methods
getUploaderControlMap()
Overrides the parent {@see \App\UI\Front\Base\Components\ParameterFormComponent\ParameterForm::getUploaderControlMap()}: maps the first IMAGE_UPLOADER to the shared `imgUploader` and the first FILE_UPLOADER to `fileUploader`.
public
getUploaderControlMap() : array<string|int, mixed>
Other parameters of the same type get a classic input (no dropzone).
Return values
array<string|int, mixed>createComponentFileUploader()
protected
createComponentFileUploader() : UploaderDropzone
Return values
UploaderDropzonecreateComponentImgUploader()
protected
createComponentImgUploader() : UploaderDropzone
Return values
UploaderDropzoneconfigureUploaders()
private
configureUploaders() : void
findFirstParameterOfType()
private
findFirstParameterOfType(int $type) : Parameter|null
Parameters
- $type : int
Return values
Parameter|nullparseFileTypes()
private
parseFileTypes(string|null $fileType, array<string|int, string> $fallback) : array<string|int, string>
Parameters
- $fileType : string|null
- $fallback : array<string|int, string>
Return values
array<string|int, string>prepareExistingAssets()
private
prepareExistingAssets() : array<int, array<string, mixed>>
Return values
array<int, array<string, mixed>>prepareExistingFiles()
private
prepareExistingFiles() : array<int, array<string, mixed>>