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<string|int, mixed>
- getHeaderAttributes() : array<string|int, mixed>
- getRecordIds() : array<string|int, mixed>
- 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
__construct()
    public
                    __construct(array<string|int, mixed> $columns, string $table, array<string|int, mixed> $recordIds, DatabaseRecordList $recordList) : mixed
    Parameters
- $columns : array<string|int, mixed>
- $table : string
- $recordIds : array<string|int, mixed>
- $recordList : DatabaseRecordList
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<string|int, mixed>
    Return values
array<string|int, mixed>getHeaderAttributes()
    public
                    getHeaderAttributes() : array<string|int, mixed>
    Return values
array<string|int, mixed>getRecordIds()
    public
                    getRecordIds() : array<string|int, mixed>
    Return values
array<string|int, mixed>getRecordList()
Returns the current DatabaseRecordList instance.
    public
                    getRecordList() : DatabaseRecordList
    Tags
Return values
DatabaseRecordListgetTable()
    public
                    getTable() : string
    Return values
stringhasColumn()
Whether the column exists
    public
                    hasColumn(string $columnName) : bool
    Parameters
- $columnName : string
Return values
boolremoveColumn()
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<string|int, mixed> $columns) : void
    Parameters
- $columns : array<string|int, mixed>
setHeaderAttributes()
    public
                    setHeaderAttributes(array<string|int, mixed> $headerAttributes) : void
    Parameters
- $headerAttributes : array<string|int, mixed>