RecordListDownloadController
Controller for handling download of records, typically executed from the list module.
This class is a specific Backend controller implementation and is not part of the TYPO3's Core API.
Attributes
- #[AsController]
Table of Contents
Properties
- $backendViewFactory : BackendViewFactory
- $eventDispatcher : EventDispatcherInterface
- $filename : string
- $format : string
- $id : int
- $modTSconfig : array<string|int, mixed>
- $responseFactory : ResponseFactoryInterface
- $table : string
Methods
- __construct() : mixed
- downloadSettingsAction() : ResponseInterface
- Generate settings form for the download request
- handleDownloadRequest() : ResponseInterface
- Handle record download request by evaluating the provided arguments, checking access, initializing the record list, fetching records and finally calling the requested download format action (e.g. csv).
- csvDownloadAction() : ResponseInterface
- Generating an download in CSV format
- generateDownloadResponse() : ResponseInterface
- generateFilename() : string
- Return an evaluated and processed custom filename or a default, if non or an invalid custom filename was provided.
- getBackendUserAuthentication() : BackendUserAuthentication
- getFormatOption() : mixed
- getFormatOptions() : array<string|int, mixed>
- getFormatOptionsWithResolvedDefaults() : array<string|int, mixed>
- Return the format options with resolved default values from TSconfig
- getSiteLanguages() : array<string|int, mixed>
- Get site languages, available for the current backend user
- jsonDownloadAction() : ResponseInterface
- Generating an download in JSON format
Properties
$backendViewFactory read-only
protected
BackendViewFactory
$backendViewFactory
$eventDispatcher read-only
protected
EventDispatcherInterface
$eventDispatcher
$filename
protected
string
$filename
= ''
$format
protected
string
$format
= ''
$id
protected
int
$id
= 0
$modTSconfig
protected
array<string|int, mixed>
$modTSconfig
= []
$responseFactory read-only
protected
ResponseFactoryInterface
$responseFactory
$table
protected
string
$table
= ''
Methods
__construct()
public
__construct(ResponseFactoryInterface $responseFactory, BackendViewFactory $backendViewFactory, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $responseFactory : ResponseFactoryInterface
- $backendViewFactory : BackendViewFactory
- $eventDispatcher : EventDispatcherInterface
downloadSettingsAction()
Generate settings form for the download request
public
downloadSettingsAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacehandleDownloadRequest()
Handle record download request by evaluating the provided arguments, checking access, initializing the record list, fetching records and finally calling the requested download format action (e.g. csv).
public
handleDownloadRequest(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacecsvDownloadAction()
Generating an download in CSV format
protected
csvDownloadAction(ServerRequestInterface $request, array<string|int, mixed> $headerRow, array<string|int, mixed> $records) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $headerRow : array<string|int, mixed>
- $records : array<string|int, mixed>
Return values
ResponseInterfacegenerateDownloadResponse()
protected
generateDownloadResponse(string $result) : ResponseInterface
Parameters
- $result : string
Return values
ResponseInterfacegenerateFilename()
Return an evaluated and processed custom filename or a default, if non or an invalid custom filename was provided.
protected
generateFilename(string $filename) : string
Parameters
- $filename : string
Return values
stringgetBackendUserAuthentication()
protected
getBackendUserAuthentication() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetFormatOption()
protected
getFormatOption(ServerRequestInterface $request, string $option[, mixed $default = null ]) : mixed
Parameters
- $request : ServerRequestInterface
- $option : string
- $default : mixed = null
getFormatOptions()
protected
getFormatOptions(ServerRequestInterface $request) : array<string|int, mixed>
Parameters
- $request : ServerRequestInterface
Return values
array<string|int, mixed>getFormatOptionsWithResolvedDefaults()
Return the format options with resolved default values from TSconfig
protected
getFormatOptionsWithResolvedDefaults() : array<string|int, mixed>
Return values
array<string|int, mixed>getSiteLanguages()
Get site languages, available for the current backend user
protected
getSiteLanguages(ServerRequestInterface $request) : array<string|int, mixed>
Parameters
- $request : ServerRequestInterface
Return values
array<string|int, mixed>jsonDownloadAction()
Generating an download in JSON format
protected
jsonDownloadAction(ServerRequestInterface $request, array<string|int, mixed> $headerRow, array<string|int, mixed> $records) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $headerRow : array<string|int, mixed>
- $records : array<string|int, mixed>