Feature: #102793 - PSR-14 event for modifying default constraints in PageRepository¶
See forge#102793
Description¶
The API class \TYPO3\CMS\Core\Domain\Repository\PageRepository
has a
method getDefaultConstraints()
which accumulates common restrictions for
a database query to limit a query for TCA-based tables in order to filter out
disabled, or scheduled records.
A new PSR-14 event
\TYPO3\CMS\Core\Domain\Event\ModifyDefaultConstraintsForDatabaseQueryEvent
has
been introduced, which allows to remove, alter or add constraints compiled by
TYPO3 for a specific table to further limit these constraints.
Impact¶
The new event contains a list of CompositeExpression
objects, allowing
to modify them via the getConstraints()
and
setConstraints(array $constraints)
methods.
Additional information, such as the used ExpressionBuilder
object or the
table name and the current Context
are also available within the event.