Skip to content

Commit

Permalink
[TASK] Improve CommentRepository.php (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alagts authored Nov 14, 2024
1 parent ac06703 commit f44eabc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Classes/Domain/Repository/CommentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
*/

use T3docs\BlogExample\Domain\Model\Comment;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use TYPO3\CMS\Extbase\Persistence\Repository;
Expand All @@ -34,8 +31,7 @@ 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);
Expand Down

0 comments on commit f44eabc

Please sign in to comment.