mirror of
https://github.com/werkraum-media/events.git
synced 2024-12-24 03:26:09 +01:00
Daniel Siepmann
00946af6ad
They sometimes use a different separator. The code is adjusted to always use same separator and precision. That will prevent the same location from showing up multiple times due to different latitude and longitude values.
21 lines
469 B
PHP
21 lines
469 B
PHP
<?php
|
|
|
|
namespace Wrm\Events\Domain\Repository;
|
|
|
|
use TYPO3\CMS\Extbase\Persistence\Repository;
|
|
use Wrm\Events\Domain\Model\Location;
|
|
|
|
class LocationRepository extends Repository
|
|
{
|
|
public function findOneByGlobalId(string $globalId): ?Location
|
|
{
|
|
$query = $this->createQuery();
|
|
|
|
return $query
|
|
->matching($query->equals('globalId', $globalId))
|
|
->setLimit(1)
|
|
->execute()
|
|
->getFirst()
|
|
;
|
|
}
|
|
}
|