mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 10:29:42 +00:00
Customize query to return ordered active gender entities
This commit is contained in:
@@ -24,4 +24,14 @@ class GenderRepository extends ServiceEntityRepository
|
||||
{
|
||||
parent::__construct($registry, Gender::class);
|
||||
}
|
||||
|
||||
public function findByActiveOrdered(): array
|
||||
{
|
||||
return $this->createQueryBuilder('g')
|
||||
->select('g')
|
||||
->where('g.active = True')
|
||||
->orderBy('g.order', 'ASC')
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user