FileStorageTreeProvider
readonly class \
Responsible for fetching a tree-structure of folders.
Internal
not part of TYPO3 Core API due to the specific use case for the FileStorageTree component.
Table of Contents
Methods
- getFilteredTree() : FolderInterface[]
- Filter a tree by a search word
- getRootNodes() : array
- Fetch all file storages / file mounts visible for a user.
- getSubfolders() : array
- prepareFolderInformation() : array
- getFoldersInStorage() : array
- Fetch all folders recursively in a single store.
- getMountsInStorage() : array|array[]
- Fetches all "root level folders" of a storage. If a user has file mounts in this storage, they are properly resolved.
Methods
getFilteredTree()
Filter a tree by a search word
public
getFilteredTree(BackendUserAuthentication $user, string $search) : FolderInterface[]
Parameters
- $user : BackendUserAuthentication
- $search : string
Tags
Return values
FolderInterface[]getRootNodes()
Fetch all file storages / file mounts visible for a user.
public
getRootNodes(BackendUserAuthentication $user) : array
Parameters
- $user : BackendUserAuthentication
Return values
arraygetSubfolders()
public
getSubfolders(Folder $folderObject, int $currentDepth) : array
Parameters
- $folderObject : Folder
- $currentDepth : int
Return values
arrayprepareFolderInformation()
public
prepareFolderInformation(Folder $folder[, string|null $alternativeName = null ][, Folder|null $parentFolder = null ][, array|null $children = null ]) : array
Parameters
- $folder : Folder
- $alternativeName : string|null = null
- $parentFolder : Folder|null = null
- $children : array|null = null
Return values
arraygetFoldersInStorage()
Fetch all folders recursively in a single store.
protected
getFoldersInStorage(ResourceStorage $resourceStorage, BackendUserAuthentication $user) : array
Parameters
- $resourceStorage : ResourceStorage
- $user : BackendUserAuthentication
Return values
arraygetMountsInStorage()
Fetches all "root level folders" of a storage. If a user has file mounts in this storage, they are properly resolved.
protected
getMountsInStorage(ResourceStorage $resourceStorage, BackendUserAuthentication $user) : array|array[]
Parameters
- $resourceStorage : ResourceStorage
- $user : BackendUserAuthentication