[FEATURE] Add restriction container that limits applicable tables
It is now possible to limit restrictions to a given set of table aliases by using the introduced \TYPO3\CMS\Core\Database\Query\Restriction\LimitToTablesRestrictionContainer. Example: $queryBuilder->getRestrictions() ->removeByType(HiddenRestriction::class) ->add( GeneralUtility::makeInstance(LimitToTablesRestrictionContainer::class) ->addForTables( GeneralUtility::makeInstance(HiddenRestriction::class), ['sys_language'] ); Resolves: #87776 Releases: master Change-Id: I7fc7108ccac93d50cfab6fa8a74809f1dfe2bd89 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60781 Tested-by:Manuel Selbach <manuel_selbach@yahoo.de> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Manuel Selbach <manuel_selbach@yahoo.de> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/core/Classes/Database/Query/QueryBuilder.php 11 additions, 0 deletionstypo3/sysext/core/Classes/Database/Query/QueryBuilder.php
- typo3/sysext/core/Classes/Database/Query/Restriction/LimitToTablesRestrictionContainer.php 115 additions, 0 deletions...e/Query/Restriction/LimitToTablesRestrictionContainer.php
- typo3/sysext/core/Documentation/Changelog/master/Feature-87776-LimitRestrictionToTablesInQueryBuilder.rst 71 additions, 0 deletions.../Feature-87776-LimitRestrictionToTablesInQueryBuilder.rst
- typo3/sysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php 101 additions, 0 deletions...ysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/LimitToTablesRestrictionContainerTest.php 95 additions, 0 deletions...ery/Restriction/LimitToTablesRestrictionContainerTest.php
Please register or sign in to comment