23 lines
669 B
PHP
23 lines
669 B
PHP
<?php
|
|
|
|
namespace App\Repository;
|
|
|
|
use App\Entity\Settings;
|
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
|
use Doctrine\Persistence\ManagerRegistry;
|
|
|
|
/** @extends ServiceEntityRepository<Settings> */
|
|
class SettingsRepository extends ServiceEntityRepository
|
|
{
|
|
public function __construct(ManagerRegistry $registry) { parent::__construct($registry, Settings::class); }
|
|
|
|
/** @return Settings[] */
|
|
public function findWithLocation(): array
|
|
{
|
|
return $this->createQueryBuilder('s')
|
|
->andWhere('s.latitude IS NOT NULL')
|
|
->andWhere('s.longitude IS NOT NULL')
|
|
->getQuery()->getResult();
|
|
}
|
|
}
|