Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function getMessagesPublishedByReferring(string $referring, $orderBy = 'createdAt DESC') |
||
17 | { |
||
18 | $orderBy = explode(' ', $orderBy); |
||
19 | |||
20 | $q = $this->createQueryBuilder('m') |
||
21 | ->andWhere('m.publishedAt is NOT NULL') |
||
22 | ->andWhere('m.referring <= :referring') |
||
23 | ->setParameter('referring', $referring) |
||
24 | ->orderBy('m.'.$orderBy[0], $orderBy[1]) |
||
25 | ->getQuery(); |
||
26 | |||
27 | return $q->getResult(); |
||
28 | } |
||
30 |