events/Classes/Domain/Repository/LocationRepository.php

24 lines
521 B
PHP
Raw Permalink Normal View History

2022-08-02 15:56:18 +02:00
<?php
declare(strict_types=1);
namespace WerkraumMedia\Events\Domain\Repository;
2022-08-02 15:56:18 +02:00
use TYPO3\CMS\Extbase\Persistence\Repository;
use WerkraumMedia\Events\Domain\Model\Location;
2022-08-02 15:56:18 +02:00
final class LocationRepository extends Repository
2022-08-02 15:56:18 +02:00
{
public function findOneByGlobalId(string $globalId): ?Location
{
$query = $this->createQuery();
return $query
->matching($query->equals('globalId', $globalId))
->setLimit(1)
->execute()
->getFirst()
;
}
2022-08-02 15:56:18 +02:00
}