RecordListDownloadController

Controller for handling download of records, typically executed from the list module.

Internal

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
$filename  : string
$format  : string
$id  : int
$modTSconfig  : array
$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
getFormatOptionsWithResolvedDefaults()  : array
Return the format options with resolved default values from TSconfig
getSiteLanguages()  : array
Get site languages, available for the current backend user
jsonDownloadAction()  : ResponseInterface
Generating an download in JSON format

Properties

$modTSconfig

protected array $modTSconfig = []

$responseFactory read-only

protected ResponseFactoryInterface $responseFactory

Methods

downloadSettingsAction()

Generate settings form for the download request

public downloadSettingsAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

handleDownloadRequest()

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
ResponseInterface

csvDownloadAction()

Generating an download in CSV format

protected csvDownloadAction(ServerRequestInterface $request, array $headerRow, array $records) : ResponseInterface
Parameters
$request : ServerRequestInterface
$headerRow : array
$records : array
Return values
ResponseInterface

generateDownloadResponse()

protected generateDownloadResponse(string $result) : ResponseInterface
Parameters
$result : string
Return values
ResponseInterface

generateFilename()

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
string

getFormatOption()

protected getFormatOption(ServerRequestInterface $request, string $option[, mixed $default = null ]) : mixed
Parameters
$request : ServerRequestInterface
$option : string
$default : mixed = null

getFormatOptions()

protected getFormatOptions(ServerRequestInterface $request) : array
Parameters
$request : ServerRequestInterface
Return values
array

getFormatOptionsWithResolvedDefaults()

Return the format options with resolved default values from TSconfig

protected getFormatOptionsWithResolvedDefaults() : array
Return values
array

getSiteLanguages()

Get site languages, available for the current backend user

protected getSiteLanguages(ServerRequestInterface $request) : array
Parameters
$request : ServerRequestInterface
Return values
array

jsonDownloadAction()

Generating an download in JSON format

protected jsonDownloadAction(ServerRequestInterface $request, array $headerRow, array $records) : ResponseInterface
Parameters
$request : ServerRequestInterface
$headerRow : array
$records : array
Return values
ResponseInterface
On this page

Search results