Пример #1
0
 /**
  * Finds first available image for listing purposes
  *
  * @param Content $content
  *
  * @return string
  */
 public function getCoverImage(Content $content)
 {
     $key = $content->getCoverImageCacheKey();
     if (!($image = $this->cache->fetch($key))) {
         $image = $content->getCoverImage();
         if ($image) {
             $image = $this->imageCacheManager->getBrowserPath($image, 'medialibrary');
         }
         $this->cache->save($key, $image, 86400);
     }
     return $image;
 }
 /**
  * Finds first available image for listing purposes TODO: this is very inefficient
  *
  * @param Content $content
  *
  * @return string
  */
 public function getCoverImage(Content $content)
 {
     return $content->getCoverImage();
 }