2018-05-25 16:19:12 +02:00
|
|
|
<?php
|
2019-12-07 12:13:32 +01:00
|
|
|
|
2019-08-12 17:25:59 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2019-12-01 12:16:06 +01:00
|
|
|
namespace TTN\Tea\Domain\Repository\Product;
|
2018-05-25 16:19:12 +02:00
|
|
|
|
2022-04-03 02:24:55 +02:00
|
|
|
use TTN\Tea\Domain\Model\Product\Tea;
|
2019-12-01 12:16:06 +01:00
|
|
|
use TTN\Tea\Domain\Repository\Traits\StoragePageAgnosticTrait;
|
2018-05-25 17:38:51 +02:00
|
|
|
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
2023-06-21 09:16:13 +02:00
|
|
|
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
2018-05-25 16:19:12 +02:00
|
|
|
use TYPO3\CMS\Extbase\Persistence\Repository;
|
|
|
|
|
|
|
|
/**
|
2022-04-03 02:24:55 +02:00
|
|
|
* @extends Repository<Tea>
|
2018-05-25 16:19:12 +02:00
|
|
|
*/
|
|
|
|
class TeaRepository extends Repository
|
|
|
|
{
|
|
|
|
use StoragePageAgnosticTrait;
|
2018-05-25 17:38:51 +02:00
|
|
|
|
|
|
|
protected $defaultOrderings = ['title' => QueryInterface::ORDER_ASCENDING];
|
2023-06-21 09:16:13 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param positive-int $ownerUid
|
|
|
|
*/
|
|
|
|
public function findByOwnerUid(int $ownerUid): QueryResultInterface
|
|
|
|
{
|
|
|
|
$query = $this->createQuery();
|
|
|
|
$query->matching($query->equals('ownerUid', $ownerUid));
|
|
|
|
|
|
|
|
return $query->execute();
|
|
|
|
}
|
2018-05-25 16:19:12 +02:00
|
|
|
}
|