PHP Class Xpressengine\Media\Models\Image

Author: XE Developers ([email protected])
Inheritance: extends Media
Show file Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property Type Description
$mimes array Available mime type

Public Methods

Method Description
getMetaModel ( ) : string Returns meta data model for current model
getThumbnail ( Media $media, string $type, string $dimension, boolean $defaultSelf = true ) : Image | null Get a thumbnail image
getThumbnails ( Media $media, null | string $type = null ) : Image[] Get thumbnails
getType ( ) : string Returns media type
render ( array $option = [] ) : string Rendered media

Method Details

getMetaModel() public method

Returns meta data model for current model
public getMetaModel ( ) : string
return string

getThumbnail() public static method

Get a thumbnail image
public static getThumbnail ( Media $media, string $type, string $dimension, boolean $defaultSelf = true ) : Image | null
$media Media media instance
$type string thumbnail make type
$dimension string dimension code
$defaultSelf boolean if set true, returns self when thumbnail not exists
return Image | null

getThumbnails() public static method

Get thumbnails
public static getThumbnails ( Media $media, null | string $type = null ) : Image[]
$media Media media instance
$type null | string thumbnail make type
return Image[]

getType() public method

Returns media type
public getType ( ) : string
return string

render() public method

Rendered media
public render ( array $option = [] ) : string
$option array rendering option
return string

Property Details

$mimes protected static property

Available mime type
protected static array $mimes
return array