mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-30 02:36:12 +01:00
21 lines
582 B
PHP
21 lines
582 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace TTN\Tea\Domain\Repository\Traits;
|
|
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
|
|
|
|
/**
|
|
* This trait for repositories makes the repository ignore the storage page setting when fetching models.
|
|
*/
|
|
trait StoragePageAgnosticTrait
|
|
{
|
|
public function initializeObject(): void
|
|
{
|
|
$querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
|
|
$querySettings->setRespectStoragePage(false);
|
|
$this->setDefaultQuerySettings($querySettings);
|
|
}
|
|
}
|