FileDownloadController
Controller class to create a zip file for given items from a file or folder.
This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.
Attributes
- #[AsController]
Table of Contents
Properties
- $context : Context
- $resourceFactory : ResourceFactory
- $responseFactory : ResponseFactoryInterface
- $streamFactory : StreamFactoryInterface
Methods
- __construct() : mixed
- handleRequest() : ResponseInterface
- collectFiles() : array<string|int, FileInterface>
- createResponse() : ResponseInterface
- getBackendUser() : BackendUserAuthentication
- getFilesAndFoldersRecursive() : iterable<string|int, mixed>
Properties
$context
protected
Context
$context
$resourceFactory
protected
ResourceFactory
$resourceFactory
$responseFactory
protected
ResponseFactoryInterface
$responseFactory
$streamFactory
protected
StreamFactoryInterface
$streamFactory
Methods
__construct()
public
__construct(ResourceFactory $resourceFactory, ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory, Context $context) : mixed
Parameters
- $resourceFactory : ResourceFactory
- $responseFactory : ResponseFactoryInterface
- $streamFactory : StreamFactoryInterface
- $context : Context
handleRequest()
public
handleRequest(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacecollectFiles()
protected
collectFiles(array<string|int, mixed> $items) : array<string|int, FileInterface>
Parameters
- $items : array<string|int, mixed>
Return values
array<string|int, FileInterface>createResponse()
protected
createResponse(string $temporaryFileName, int $filesAdded) : ResponseInterface
Parameters
- $temporaryFileName : string
- $filesAdded : int
Return values
ResponseInterfacegetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetFilesAndFoldersRecursive()
protected
getFilesAndFoldersRecursive(Folder $folder) : iterable<string|int, mixed>
Parameters
- $folder : Folder