DownloadRecordList

Fetches all records like in the list 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.

Internal

this class is not part of the TYPO3 Core API due to its nature as being a wrapper for DatabaseRecordList and a very specific implementation.

Table of Contents

Properties

$recordList  : DatabaseRecordList
$translationConfigurationProvider  : TranslationConfigurationProvider

Methods

__construct()  : mixed
getHeaderRow()  : array<string|int, mixed>
Add header line with field names.
getRecords()  : array<string|int, array<string|int, mixed>>
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<string|int, mixed>
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(array<string|int, string> $columnsToRender) : array<string|int, mixed>
Parameters
$columnsToRender : array<string|int, string>
Return values
array<string|int, mixed>

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, array<string|int, string> $columnsToRender, BackendUserAuthentication $backendUser[, bool $hideTranslations = false ][, bool $rawValues = false ]) : array<string|int, array<string|int, mixed>>
Parameters
$table : string

the TCA table

$columnsToRender : array<string|int, 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<string|int, array<string|int, mixed>>

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<string|int, mixed> $row, array<string|int, string> $columnsToRender, int $pageId, bool $rawValues) : array<string|int, mixed>
Parameters
$table : string

Table name

$row : array<string|int, mixed>

Current record

$columnsToRender : array<string|int, string>

the columns to be displayed / downloaded

$pageId : int

used for the legacy hook

$rawValues : bool

Whether the field values should not be processed

Return values
array<string|int, mixed>

the prepared row


        
On this page

Search results