Skip to content
Snippets Groups Projects
Commit 402a4b9d authored by Benni Mack's avatar Benni Mack
Browse files

[!!!][FEATURE] Migrate enableFields hook to PSR-14 event

This change replaces the hook to manipulate enableFields
DB query constraints in PageRepository with a PSR-14
Event called "ModifyDefaultConstraintsForDatabaseQueryEvent"
which allows to manipulate existing constraints as well.

At the same time, the method "PageRepository->enableFields"
is deprecated in favor of a new method called "getDefaultConstraints()"
consisting of of two arguments now,
removing the superfluous "show_hidden" which can be
also set via the next method argument "$ignoreArray"
as well.

"getDefaultConstraints()" returns an array of constraints,
which is quite handy to use in your own Doctrine DB
QueryBuilders. This method also supports tableAlias
definitions, useful for JOINs in e.g. Extbase.

Resolves: #102793
Releases: main
Change-Id: I5816e97ebda3a0ba8945b0ec2001eafe515b7076
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82405


Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent e9659d11
Branches
Tags
Showing
with 513 additions and 105 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment