| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 19 | protected function prepareList($criteria, $parameters) |
||
| 20 | { |
||
| 21 | $service = \Zend_Registry::get('container')->get('paywall.subscription.service'); |
||
| 22 | $userService = \Zend_Registry::get('container')->get('user'); |
||
| 23 | $user = $userService->getCurrentUser(); |
||
| 24 | $criteria->user = $user->getId(); |
||
| 25 | $list = $service->getMySubscriptionsByCriteria($criteria); |
||
| 26 | $filteredIitems = $service->filterMySubscriptions($list->items); |
||
| 27 | |||
| 28 | $list->items = array(); |
||
| 29 | foreach ($filteredIitems as $key => $value) { |
||
| 30 | $list->items[] = new MetaSubscription($value); |
||
| 31 | } |
||
| 32 | |||
| 33 | return $list; |
||
| 34 | } |
||
| 35 | |||
| 47 |