DownloadRecordList

class \TYPO3\CMS\Backend\RecordList\DownloadRecordList

Fetches all records like in the records module but returns them as array in order to allow downloads (e.g. CSV) in the Controller with prepared data.

This class acts as a composition-based wrapper for DatabaseRecordList for creating records ready to be downloaded.

Table of Contents

Properties

$recordList  : DatabaseRecordList
$tcaSchemaFactory  : TcaSchemaFactory
$translationConfigurationProvider  : TranslationConfigurationProvider

Methods

__construct()  : mixed
getHeaderRow()  : array
Add header line with field names.
getRecords()  : array[]
Fetches records including translations (if not hidden) from the database in the specified order given by DatabaseRecordList and returns the prepared records ready to be rendered.
prepareRow()  : array
Prepares a DB row to process the values and maps the values to the columns to render to have the same output.

Properties

Methods

getHeaderRow()

Add header line with field names.

public getHeaderRow(string[] $columnsToRender) : array

Parameters

$columnsToRender : string[]

Return values

array —

the columns to be used / shown.

getRecords()

Fetches records including translations (if not hidden) from the database in the specified order given by DatabaseRecordList and returns the prepared records ready to be rendered.

public getRecords(string $table, string[] $columnsToRender, BackendUserAuthentication $backendUser[, bool $hideTranslations = false ][, bool $rawValues = false ]) : array[]

Parameters

$table : string

the TCA table

$columnsToRender : string[]
$backendUser : BackendUserAuthentication

the current backend user needed to check for permissions

$hideTranslations : bool = false
$rawValues : bool = false

Whether the field values should not be processed

Return values

array[] —

an array of rows ready to be output

prepareRow()

Prepares a DB row to process the values and maps the values to the columns to render to have the same output.

protected prepareRow(string $table, array $row, string[] $columnsToRender, bool $rawValues) : array

Parameters

$table : string

Table name

$row : array

Current record

$columnsToRender : string[]

the columns to be displayed / downloaded

$rawValues : bool

Whether the field values should not be processed

Return values

array —

the prepared row

On this page