From 7c61186626815c81c23ecdfce967464e1dbbf789 Mon Sep 17 00:00:00 2001 From: Patrick Schriner Date: Fri, 8 Nov 2024 09:30:51 +0100 Subject: [PATCH] Update DefaultQuerySettings.rst.txt --- .../CodeSnippets/Extbase/Domain/DefaultQuerySettings.rst.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Documentation/CodeSnippets/Extbase/Domain/DefaultQuerySettings.rst.txt b/Documentation/CodeSnippets/Extbase/Domain/DefaultQuerySettings.rst.txt index 95ca839dfd..05e9ff88a0 100644 --- a/Documentation/CodeSnippets/Extbase/Domain/DefaultQuerySettings.rst.txt +++ b/Documentation/CodeSnippets/Extbase/Domain/DefaultQuerySettings.rst.txt @@ -6,14 +6,12 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface; - use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; class CommentRepository extends Repository { public function initializeObject(): void { - /** @var QuerySettingsInterface $querySettings */ - $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); + $querySettings = $this->createQuery()->getQuerySettings(); // Show comments from all pages $querySettings->setRespectStoragePage(false); $this->setDefaultQuerySettings($querySettings);