CoolCMS API

UploaderTrait

Configures 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 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`. Other parameters of the same type get a classic input (no dropzone).
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 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`. Other parameters of the same type get a classic input (no dropzone).

public getUploaderControlMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

parseFileTypes()

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>>
Return values
array<int, array<string, mixed>>
On this page

Search results