mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
order user jobs alphabetically when returning all active user jobs
This commit is contained in:
@@ -40,7 +40,11 @@ readonly class UserJobRepository implements UserJobRepositoryInterface
|
||||
|
||||
public function findAllActive(): array
|
||||
{
|
||||
return $this->repository->findBy(['active' => true]);
|
||||
$jobs = $this->repository->findBy(['active' => true]);
|
||||
|
||||
usort($jobs, fn (UserJob $a, UserJob $b) => $this->translatableStringHelper->localize($a->getLabel()) <=> $this->translatableStringHelper->localize($b->getLabel()));
|
||||
|
||||
return $jobs;
|
||||
}
|
||||
|
||||
public function findAllOrderedByName(): array
|
||||
|
Reference in New Issue
Block a user