mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-09 06:49:41 +00:00
First Widget Bar + Number of notification unread. All is hardcoded
This commit is contained in:
@@ -113,4 +113,17 @@ final class AccompanyingPeriodRepository implements ObjectRepository
|
||||
|
||||
return $qb;
|
||||
}
|
||||
public function countByUserGroupedByMonth(User $user): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('a');
|
||||
|
||||
$qb->select()
|
||||
->addSelect('COUNT(a.id) AS count')
|
||||
->andWhere('a.user = :user')
|
||||
->setParameter('user', $user)
|
||||
->groupBy('month')
|
||||
->orderBy('month', 'ASC');
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user