mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 14:54:57 +00:00
DX: modernize controller for permissions groups and order them alphabetically
This commit is contained in:
@@ -38,6 +38,19 @@ final class PermissionsGroupRepository implements ObjectRepository
|
||||
return $this->repository->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<PermissionsGroup>
|
||||
*/
|
||||
public function findAllOrderedAlphabetically(): array
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('pg');
|
||||
|
||||
return $qb->select(['pg', 'pg.name AS HIDDEN sort_name'])
|
||||
->orderBy('sort_name')
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed|null $limit
|
||||
* @param mixed|null $offset
|
||||
|
Reference in New Issue
Block a user