WIP: weather integration
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user