events/Classes/Domain/Repository/LocationRepository.php

22 lines
469 B
PHP
Raw Permalink Normal View History

2022-08-02 15:56:18 +02:00
<?php
namespace Wrm\Events\Domain\Repository;
use TYPO3\CMS\Extbase\Persistence\Repository;
use Wrm\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
}