Feature: #106510 - Add PSR-14 events to Extbase Backend::getObjectCountByQuery method
See forge#106510
Description
The class
\TYPO3\ is the central
entity for retrieving data from the database within the Extbase persistence
framework.
Since 2013, the
get method has supported events
(previously signals) to allow modification of data retrieval.
In many use cases, especially when used together with
\Query, another key method is
involved:
get. This method is frequently used in
combination with Fluid templates.
Until now, extensions or other code using the existing events for data retrieval could not ensure consistent modification of queries between data retrieval and counting operations, resulting in mismatched query results.
The
get method has now been enhanced with new PSR-14
events, enabling extensions to modify all aspects of query processing within
Extbase's generic
Backend to achieve consistent results.
The new events are:
ModifyQuery Before Fetching Object Count Event - Allows modification of the query before it is passed to the storage backend.
ModifyResult After Fetching Object Count Event - Allows adjustment of the result after the query has been executed.
Typically, an extension should implement these events pairwise:
Modifytogether withQuery Before Fetching Object Count Event ModifyQuery Before Fetching Object Data Event Modifytogether withResult After Fetching Object Count Event ModifyResult After Fetching Object Data Event