Ejemplo n.º 1
0
 /**
  * Returns a list of thotos in album
  *
  * @param int $album
  * @param int $page
  * @param int $limit
  * @param null $exclude
  * @return string
  */
 public function getAlbumPhotos($album, $page, $limit, $exclude = null)
 {
     $photos = $this->photoDao->getAlbumPhotos($album, $page, $limit, $exclude);
     $list = array();
     if ($photos) {
         $commentService = BOL_CommentService::getInstance();
         foreach ($photos as $key => $photo) {
             $list[$key]['id'] = $photo->id;
             $list[$key]['dto'] = $photo;
             $list[$key]['comments_count'] = $commentService->findCommentCount('photo', $photo->id);
             $list[$key]['url'] = $this->getPhotoPreviewUrl($photo->id, $photo->hash);
         }
     }
     return $list;
 }
Ejemplo n.º 2
0
 /**
  * Returns a list of thotos in album
  *
  * @param int $album
  * @param int $page
  * @param int $limit
  * @param null $exclude
  * @return string
  */
 public function getAlbumPhotos($album, $page, $limit, $exclude = null, $status = PHOTO_BOL_PhotoDao::STATUS_APPROVED)
 {
     $photos = $this->photoDao->getAlbumPhotos($album, $page, $limit, $exclude, $status);
     $list = array();
     if ($photos) {
         $commentService = BOL_CommentService::getInstance();
         foreach ($photos as $key => $photo) {
             $list[$key]['id'] = $photo->id;
             $list[$key]['dto'] = $photo;
             $list[$key]['comments_count'] = $commentService->findCommentCount('photo', $photo->id);
             $list[$key]['url'] = $this->getPhotoUrl($photo->id, TRUE, $photo->hash);
         }
     }
     return $list;
 }