events/Classes/Domain/Repository/LocationRepository.php

22 lines
489 B
PHP
Raw Normal View History

2022-08-02 15:56:18 +02:00
<?php
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
class LocationRepository extends Repository
{
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
}