public function getPhotoListCategory($category, $page, $limit, $checkPrivacy) { $photos = $this->advancedphotoDao->getPhotoListCategory($category, $page, $limit, $checkPrivacy); if ($photos) { foreach ($photos as $key => $photo) { $photos[$key]['url'] = $this->photoService->getPhotoPreviewUrl($photo['id']); } } return $photos; }