ModifyRecordListHeaderColumnsEvent

final class \TYPO3\CMS\Recordlist\Event\ModifyRecordListHeaderColumnsEvent

An event to modify the header columns for a table in the RecordList

Table of Contents

Methods

__construct()  : mixed
getColumn()  : string|null
Get column by its name
getColumns()  : array
getHeaderAttributes()  : array
getRecordIds()  : array
getRecordList()  : DatabaseRecordList
Returns the current DatabaseRecordList instance.
getTable()  : string
hasColumn()  : bool
Whether the column exists
removeColumn()  : bool
Remove column by its name
setColumn()  : void
Add a new column or override an existing one. Latter is only possible, in case $columnName is given. Otherwise, the column will be added with a numeric index, which is generally not recommended.
setColumns()  : void
setHeaderAttributes()  : void

Methods

getColumn()

Get column by its name

public getColumn(string $columnName) : string|null

Parameters

$columnName : string

Return values

string|null —

The column or NULL if the column does not exist

getColumns()

public getColumns() : array

Return values

array

getHeaderAttributes()

public getHeaderAttributes() : array

Return values

array

getRecordIds()

public getRecordIds() : array

Return values

array

getTable()

public getTable() : string

Return values

string

hasColumn()

Whether the column exists

public hasColumn(string $columnName) : bool

Parameters

$columnName : string

Return values

bool

removeColumn()

Remove column by its name

public removeColumn(string $columnName) : bool

Parameters

$columnName : string

Return values

bool —

Whether the column could be removed - Will therefore return FALSE if the column to remove does not exist.

setColumn()

Add a new column or override an existing one. Latter is only possible, in case $columnName is given. Otherwise, the column will be added with a numeric index, which is generally not recommended.

public setColumn(string $column[, string $columnName = '' ]) : void

Note: Due to the behaviour of DatabaseRecordList, just adding a column does not mean that it is also displayed. The internal $fieldArray needs to be adjusted as well. This method only adds the column to the data array. Therefore, this method should mainly be used to edit existing columns, e.g. change their label.

Parameters

$column : string
$columnName : string = ''

setColumns()

public setColumns(array $columns) : void

Parameters

$columns : array

setHeaderAttributes()

public setHeaderAttributes(array $headerAttributes) : void

Parameters

$headerAttributes : array
On this page