ModifyRecordListHeaderColumnsEvent¶
New in version 11.4
An event to modify the header columns for a table in the record list.
API¶
- class ModifyRecordListHeaderColumnsEvent ¶
-
- Fully qualified name
-
\TYPO3\
CMS\ Recordlist\ Event\ Modify Record List Header Columns Event
An event to modify the header columns for a table in the RecordList
- setColumn ( string $column, string $columnName = '') ¶
-
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.
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.
- param string $column
-
the column
- param string $columnName
-
the columnName, default: ''
- hasColumn ( string $columnName) ¶
-
Whether the column exists
- param string $columnName
-
the columnName
- returntype
-
bool
- getColumn ( string $columnName) ¶
-
Get column by its name
- param string $columnName
-
the columnName
- returntype
-
string
- Returns
-
The column or NULL if the column does not exist
- removeColumn ( string $columnName) ¶
-
Remove column by its name
- param string $columnName
-
the columnName
- returntype
-
bool
- Returns
-
Whether the column could be removed - Will therefore return FALSE if the column to remove does not exist.
- setColumns ( array $columns) ¶
-
- param array $columns
-
the columns
- getColumns ( ) ¶
-
- returntype
-
array
- setHeaderAttributes ( array $headerAttributes) ¶
-
- param array $headerAttributes
-
the headerAttributes
- getHeaderAttributes ( ) ¶
-
- returntype
-
array
- getTable ( ) ¶
-
- returntype
-
string
- getRecordIds ( ) ¶
-
- returntype
-
array
- getRecordList ( ) ¶
-
Returns the current DatabaseRecordList instance.
- returntype
-
TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList