| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function findActiveByChannel(ChannelInterface $channel): array |
||
| 44 | { |
||
| 45 | $promotions = $this->filterByActive($this->createQueryBuilder('o')) |
||
| 46 | ->andWhere(':channel MEMBER OF o.channels') |
||
| 47 | ->setParameter('channel', $channel) |
||
| 48 | ->addOrderBy('o.priority', 'DESC') |
||
| 49 | ->getQuery() |
||
| 50 | ->getResult() |
||
| 51 | ; |
||
| 52 | |||
| 53 | $this->associationHydrator->hydrateAssociations($promotions, [ |
||
| 54 | 'rules', |
||
| 55 | ]); |
||
| 56 | |||
| 57 | return $promotions; |
||
| 58 | } |
||
| 59 | } |
||
| 60 |