mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-10 08:16:12 +01:00
248c759206
Fixes #1024 Supersedes #1024
30 lines
782 B
PHP
30 lines
782 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace TTN\Tea\Domain\Repository;
|
|
|
|
use TTN\Tea\Domain\Model\Tea;
|
|
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
|
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
|
use TYPO3\CMS\Extbase\Persistence\Repository;
|
|
|
|
/**
|
|
* @extends Repository<Tea>
|
|
*/
|
|
class TeaRepository extends Repository
|
|
{
|
|
protected $defaultOrderings = ['title' => QueryInterface::ORDER_ASCENDING];
|
|
|
|
/**
|
|
* @param positive-int $ownerUid
|
|
*/
|
|
public function findByOwnerUid(int $ownerUid): QueryResultInterface
|
|
{
|
|
$query = $this->createQuery();
|
|
$query->setQuerySettings($query->getQuerySettings()->setRespectStoragePage(false));
|
|
$query->matching($query->equals('ownerUid', $ownerUid));
|
|
|
|
return $query->execute();
|
|
}
|
|
}
|