|
@@ 174-183 (lines=10) @@
|
| 171 |
|
* @param Closure $filterScope |
| 172 |
|
* @return mixed |
| 173 |
|
*/ |
| 174 |
|
public function getNotRead($toId, $limit = null, $paginate = null, $orderDate = 'desc', Closure $filterScope = null) |
| 175 |
|
{ |
| 176 |
|
$notifications = $this->notifynderRepo->getNotRead( |
| 177 |
|
$toId, $this->entity, |
| 178 |
|
$limit, null, $orderDate, |
| 179 |
|
$filterScope |
| 180 |
|
); |
| 181 |
|
|
| 182 |
|
return $this->getPaginatedIfNeeded($notifications, $limit, $paginate); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
/** |
| 186 |
|
* Get All notifications. |
|
@@ 195-204 (lines=10) @@
|
| 192 |
|
* @param Closure $filterScope |
| 193 |
|
* @return mixed |
| 194 |
|
*/ |
| 195 |
|
public function getAll($toId, $limit = null, $paginate = null, $orderDate = 'desc', Closure $filterScope = null) |
| 196 |
|
{ |
| 197 |
|
$notifications = $this->notifynderRepo->getAll( |
| 198 |
|
$toId, $this->entity, |
| 199 |
|
$limit, null, $orderDate, |
| 200 |
|
$filterScope |
| 201 |
|
); |
| 202 |
|
|
| 203 |
|
return $this->getPaginatedIfNeeded($notifications, $limit, $paginate); |
| 204 |
|
} |
| 205 |
|
|
| 206 |
|
protected function getPaginatedIfNeeded(NotifynderCollection $notifications, $limit, $paginate) |
| 207 |
|
{ |