DefaultUploadFolderResolver
Finds the best matching upload folder for a specific backend user when uploading or selecting files, based on UserTSconfig or PageTSconfig
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Properties
Methods
- __construct() : mixed
- getDefaultUploadFolderForPage() : Folder|null
- getDefaultUploadFolderForUser() : Folder|null
- resolve() : Folder|bool
- getDefaultUploadFolder() : Folder|null
- Detects the first default folder of the first storage that the backend user has access to.
- resolveFolder() : Folder|null
Properties
$eventDispatcher read-only
protected
EventDispatcher
$eventDispatcher
$resourceFactory read-only
protected
ResourceFactory
$resourceFactory
Methods
__construct()
public
__construct(ResourceFactory $resourceFactory, EventDispatcher $eventDispatcher) : mixed
Parameters
- $resourceFactory : ResourceFactory
- $eventDispatcher : EventDispatcher
getDefaultUploadFolderForPage()
public
getDefaultUploadFolderForPage(int|null $pid) : Folder|null
Parameters
- $pid : int|null
Return values
Folder|nullgetDefaultUploadFolderForUser()
public
getDefaultUploadFolderForUser(BackendUserAuthentication $backendUser) : Folder|null
Parameters
- $backendUser : BackendUserAuthentication
Return values
Folder|nullresolve()
public
resolve(BackendUserAuthentication $user[, int|null $pid = null ][, string|null $table = null ][, string|null $field = null ]) : Folder|bool
Parameters
- $user : BackendUserAuthentication
- $pid : int|null = null
- $table : string|null = null
- $field : string|null = null
Return values
Folder|boolgetDefaultUploadFolder()
Detects the first default folder of the first storage that the backend user has access to.
protected
getDefaultUploadFolder(BackendUserAuthentication $backendUser) : Folder|null
If the default storage is not available, all other storages are then checked as well.
Parameters
- $backendUser : BackendUserAuthentication
Return values
Folder|nullresolveFolder()
protected
resolveFolder(string $uploadPath) : Folder|null
Parameters
- $uploadPath : string