Multi-images component, refactoring medias functions
This commit is contained in:
@@ -35,7 +35,18 @@ trait Imageable
|
||||
|
||||
public static function getPreviewSrc($image, $with_undefined = true)
|
||||
{
|
||||
return $image ? Medias::getPreviewSrc($image) : ($with_undefined ? '/img/visuel-non-disponible.jpg' :'');
|
||||
return $image ? Medias::getPreviewSrc($image) : ($with_undefined ? '/img/visuel-non-disponible.jpg' : '');
|
||||
}
|
||||
|
||||
public static function getNormal($image, $with_undefined = true)
|
||||
{
|
||||
$src = self::getNormalSrc($image, $with_undefined);
|
||||
return $src ? "<img src='$src'>" : '';
|
||||
}
|
||||
|
||||
public static function getNormalSrc($image, $with_undefined = true)
|
||||
{
|
||||
return $image ? Medias::getNormalSrc($image) : ($with_undefined ? '/img/visuel-non-disponible.jpg' : '');
|
||||
}
|
||||
|
||||
public static function getImage($image, $with_undefined = true)
|
||||
|
||||
Reference in New Issue
Block a user