Add method to get image with parent for article

This commit is contained in:
Ludovic CANDELLIER
2022-03-07 22:10:59 +01:00
parent 30876ba67d
commit 14931bc5e6
4 changed files with 38 additions and 7 deletions

View File

@@ -33,7 +33,8 @@ class Offers
public static function getThumbSrc(Offer $offer)
{
return $offer->article ? Articles::getThumbSrc($offer->article->image) : false;
$image = $offer->article ? Articles::getFullImageByArticle($offer->article) : false;
return $image ? Articles::getThumbSrc($image) : false;
}
public static function getLast()