feat: custom destinations
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Repository;
|
||||
use App\Entity\Destination;
|
||||
use App\Repository\Traits\QueryHelperTrait;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\Query;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
@@ -24,6 +25,20 @@ class DestinationRepository extends ServiceEntityRepository
|
||||
parent::__construct($registry, Destination::class);
|
||||
}
|
||||
|
||||
public function getListQueryForCustom(): Query
|
||||
{
|
||||
$qb = $this->createQueryBuilder('destination');
|
||||
|
||||
return $qb
|
||||
->where(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->isNull('destination.deletedAt'),
|
||||
$qb->expr()->isNull('destination.busProId'))
|
||||
)
|
||||
->getQuery()
|
||||
;
|
||||
}
|
||||
|
||||
public function getAutocompletionData(string $search, bool $upcomingOnly = true): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('destination');
|
||||
|
||||
Reference in New Issue
Block a user