| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 38 | protected function getSubscriptions($publicationId, $userId) |
||
| 39 | { |
||
| 40 | $em = \Zend_Registry::get('container')->getService('em'); |
||
| 41 | |||
| 42 | $subscriptions = $em->getRepository("Newscoop\PaywallBundle\Entity\UserSubscription") |
||
| 43 | ->createQueryBuilder('s') |
||
| 44 | ->select('s.id') |
||
| 45 | ->where('s.publication = :publicationId') |
||
| 46 | ->andWhere('s.user = :userId') |
||
| 47 | ->setParameters(array( |
||
| 48 | 'publicationId' => $publicationId, |
||
| 49 | 'userId' => $userId, |
||
| 50 | )) |
||
| 51 | ->orderBy('s.created_at', 'asc') |
||
| 52 | ->getQuery() |
||
| 53 | ->getArrayResult(); |
||
| 54 | |||
| 55 | return $subscriptions; |
||
| 56 | } |
||
| 57 | } |
||
| 58 |