PHP Class Pimcore\Model\Asset\Document\ImageThumbnail

Show file Open project: pimcore/pimcore

Protected Properties

Property Type Description
$asset Pimcore\Model\Asset\Video
$config Pimcore\Model\Asset\Image\Thumbnail\Config
$deferred boolean
$filesystemPath mixed | string
$height integer
$page integer
$realHeight integer
$realWidth integer
$width integer

Public Methods

Method Description
__construct ( $asset, $config = null, integer $page = 1, boolean $deferred = true ) ImageThumbnail constructor.
__toString ( ) : string Get the public path to the thumbnail image.
generate ( )
getAsset ( ) : Image
getConfig ( ) : Config Get thumbnail image configuration.
getDimensions ( ) : array
getFileSystemPath ( ) : mixed | string
getHeight ( ) : integer Get the width of the generated thumbnail image in pixels.
getPath ( ) : mixed
getRealHeight ( ) : integer Get the real width of the generated thumbnail image in pixels. (when using high resolution option)
getRealWidth ( ) : integer
getWidth ( ) : integer
reset ( )

Protected Methods

Method Description
createConfig ( $selector ) : boolean | static

Method Details

__construct() public method

ImageThumbnail constructor.
public __construct ( $asset, $config = null, integer $page = 1, boolean $deferred = true )
$asset
$config
$page integer
$deferred boolean

__toString() public method

This method is here for backwards compatility. Up to Pimcore 1.4.8 a thumbnail was returned as a path to an image.
public __toString ( ) : string
return string Public path to thumbnail image.

createConfig() protected method

protected createConfig ( $selector ) : boolean | static
$selector
return boolean | static

generate() public method

public generate ( )

getAsset() public method

public getAsset ( ) : Image
return Pimcore\Model\Asset\Image The original image from which this thumbnail is generated.

getConfig() public method

Get thumbnail image configuration.
public getConfig ( ) : Config
return Pimcore\Model\Asset\Image\Thumbnail\Config

getDimensions() public method

public getDimensions ( ) : array
return array

getFileSystemPath() public method

public getFileSystemPath ( ) : mixed | string
return mixed | string

getHeight() public method

Get the width of the generated thumbnail image in pixels.
public getHeight ( ) : integer
return integer Height of the generated thumbnail image.

getPath() public method

public getPath ( ) : mixed
return mixed

getRealHeight() public method

Get the real width of the generated thumbnail image in pixels. (when using high resolution option)
public getRealHeight ( ) : integer
return integer Height of the generated thumbnail image.

getRealWidth() public method

public getRealWidth ( ) : integer
return integer real Width of the generated thumbnail image. (when using high resolution option)

getWidth() public method

public getWidth ( ) : integer
return integer Width of the generated thumbnail image.

reset() public method

public reset ( )

Property Details

$asset protected property

protected Video,Pimcore\Model\Asset $asset
return Pimcore\Model\Asset\Video

$config protected property

protected Config,Pimcore\Model\Asset\Image\Thumbnail $config
return Pimcore\Model\Asset\Image\Thumbnail\Config

$deferred protected property

protected bool $deferred
return boolean

$filesystemPath protected property

protected mixed|string $filesystemPath
return mixed | string

$height protected property

protected int $height
return integer

$page protected property

protected int $page
return integer

$realHeight protected property

protected int $realHeight
return integer

$realWidth protected property

protected int $realWidth
return integer

$width protected property

protected int $width
return integer