| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function getSponsorsOfEventWithCategory(Event $event) |
||
| 24 | { |
||
| 25 | $qb = $this->createQueryBuilder('s'); |
||
| 26 | |||
| 27 | $qb->select('s', 'c.id') |
||
| 28 | ->where($qb->expr()->eq('e.id', ':eventId')) |
||
| 29 | ->join('s.sponsorEvents', 'se') |
||
| 30 | ->join('se.event', 'e') |
||
| 31 | ->join('se.category', 'c') |
||
| 32 | ->setParameter('eventId', $event->getId()) |
||
| 33 | ->orderBy('c.sortOrder', 'DESC') |
||
| 34 | ->orderBy('s.sortOrder', 'DESC') |
||
| 35 | ; |
||
| 36 | |||
| 37 | return $qb->getQuery()->getResult(); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |