Feature: #76259 - Introduce buildQueryParametersPostProcess Hook
See forge#76259
Description
With the migration to Doctrine the hook build
has been introduced in the class Database
. This hook
replaces the hook make
from the deprecated method
Abstract
.
Using this hook allows modifying the parameters used to query the database for records to be shown in the record list view.
The hook-object needs to be registered in $GLOBALS
and implement the public method build
.
The signature of the build
method is as following:
public function buildQueryParametersPostProcess(
array $parameters,
string $table,
int $pageId,
array $additionalConstraints,
array $fieldList,
AbstractDatabaseRecordList $parentObject
) : void {
}
The following fields are part of the $parameters
array and can be modified:
Key | Type | Description |
table | string | The queried tablename |
fields | string[] | The columns to retrieve |
groupBy | string[] | The columns to group the result by |
firstResult | int|null | The offset to start retrieve rows from |
maxResults | int|null | The maximum number of rows to retrieve |
orderBy | array[] | Array of arrays containing fieldname/sorting pairs |
where | string[] | Array of where conditions to apply to the database query. |