37 lines
1012 B
PHP
37 lines
1012 B
PHP
<?php
|
|
|
|
namespace App\Repository;
|
|
|
|
use App\Dto\Content\ContentFilterDto;
|
|
use App\Entity\Disease;
|
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
|
use Doctrine\ORM\QueryBuilder;
|
|
use Doctrine\Persistence\ManagerRegistry;
|
|
|
|
/**
|
|
* @method Disease|null find($id, $lockMode = null, $lockVersion = null)
|
|
* @method Disease|null findOneBy(array $criteria, array $orderBy = null)
|
|
* @method Disease[] findAll()
|
|
* @method Disease[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
|
*/
|
|
class DiseaseRepository extends ServiceEntityRepository
|
|
{
|
|
use ContentFilterTrait;
|
|
|
|
public function __construct(ManagerRegistry $registry)
|
|
{
|
|
parent::__construct($registry, Disease::class);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public function createFilteredQueryBuilder(ContentFilterDto $filters): QueryBuilder
|
|
{
|
|
$qb = $this->createQueryBuilder('d')->orderBy('d.id', 'ASC');
|
|
|
|
$this->applyCommonFilters($qb, 'd', $filters);
|
|
|
|
return $qb;
|
|
}
|
|
}
|