PHP Class Pimcore\Model\Asset\Image\Thumbnail

Afficher le fichier Open project: pimcore/pimcore Class Usage Examples

Protected Properties

Свойство Type Description
$asset Pimcore\Model\Asset\Image
$config Pimcore\Model\Asset\Image\Thumbnail\Config
$deferred boolean
$embedPicturePolyfill boolean
$filesystemPath mixed | string
$height integer
$mimetype string
$pictureElementInUse boolean
$realHeight integer
$realWidth integer
$width integer

Méthodes publiques

Méthode Description
__construct ( $asset, null $config = null, boolean $deferred = true )
__toString ( ) : string Get the public path to the thumbnail image.
generate ( boolean $deferredAllowed = true )
getAsset ( ) : Image
getChecksum ( string $type = "md5" ) : null | string
getConfig ( ) : Config Get thumbnail image configuration.
getDimensions ( ) : array
getEmbedPicturePolyfill ( ) : boolean
getFileExtension ( ) : string
getFileSystemPath ( boolean $deferredAllowed = false ) : mixed | string
getHTML ( array $options = [], array $removeAttributes = [] ) : string Get generated HTML for displaying the thumbnail image in a HTML document. (XHTML compatible).
getHeight ( ) : integer Get the width of the generated thumbnail image in pixels.
getMedia ( string $name, integer $highRes = 1 ) : Thumbnail
getMimeType ( ) : string Get the height of the generated thumbnail image in pixels.
getPath ( boolean $deferredAllowed = true ) : mixed | string
getRealHeight ( ) : integer Get the real width of the generated thumbnail image in pixels. (when using high resolution option)
getRealWidth ( ) : integer
getWidth ( ) : integer
isPictureElementInUse ( ) : boolean
reset ( )
setEmbedPicturePolyfill ( boolean $embedPicturePolyfill )
setPictureElementInUse ( boolean $flag ) : void Enables, when set to true, dispatchLoopShutdown of Pimcore_Controller_Plugin_Thumbnail

Méthodes protégées

Méthode Description
createConfig ( mixed $selector ) : Config Get a thumbnail image configuration.

Method Details

__construct() public méthode

public __construct ( $asset, null $config = null, boolean $deferred = true )
$asset
$config null
$deferred boolean

__toString() public méthode

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
Résultat string Public path to thumbnail image.

createConfig() protected méthode

Get a thumbnail image configuration.
protected createConfig ( mixed $selector ) : Config
$selector mixed Name, array or object describing a thumbnail configuration.
Résultat Pimcore\Model\Asset\Image\Thumbnail\Config

generate() public méthode

public generate ( boolean $deferredAllowed = true )
$deferredAllowed boolean

getAsset() public méthode

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

getChecksum() public méthode

public getChecksum ( string $type = "md5" ) : null | string
$type string
Résultat null | string

getConfig() public méthode

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

getDimensions() public méthode

public getDimensions ( ) : array
Résultat array

getEmbedPicturePolyfill() public static méthode

public static getEmbedPicturePolyfill ( ) : boolean
Résultat boolean

getFileExtension() public méthode

public getFileExtension ( ) : string
Résultat string

getFileSystemPath() public méthode

public getFileSystemPath ( boolean $deferredAllowed = false ) : mixed | string
$deferredAllowed boolean
Résultat mixed | string

getHTML() public méthode

Attributes can be added as a parameter. Attributes containing illigal characters are ignored. Width and Height attribute can be overridden. SRC-attribute not. Values of attributes are escaped.
public getHTML ( array $options = [], array $removeAttributes = [] ) : string
$options array Custom configurations and HTML attributes.
$removeAttributes array Listof key-value pairs of HTML attributes that should be removed
Résultat string IMG-element with at least the attributes src, width, height, alt.

getHeight() public méthode

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

getMedia() public méthode

public getMedia ( string $name, integer $highRes = 1 ) : Thumbnail
$name string
$highRes integer
Résultat Thumbnail

getMimeType() public méthode

Get the height of the generated thumbnail image in pixels.
public getMimeType ( ) : string
Résultat string HTTP Mime Type of the generated thumbnail image.

getPath() public méthode

public getPath ( boolean $deferredAllowed = true ) : mixed | string
$deferredAllowed boolean
Résultat mixed | string

getRealHeight() public méthode

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

getRealWidth() public méthode

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

getWidth() public méthode

public getWidth ( ) : integer
Résultat integer Width of the generated thumbnail image.

isPictureElementInUse() public static méthode

public static isPictureElementInUse ( ) : boolean
Résultat boolean

reset() public méthode

public reset ( )

setEmbedPicturePolyfill() public static méthode

public static setEmbedPicturePolyfill ( boolean $embedPicturePolyfill )
$embedPicturePolyfill boolean

setPictureElementInUse() public static méthode

Enables, when set to true, dispatchLoopShutdown of Pimcore_Controller_Plugin_Thumbnail
public static setPictureElementInUse ( boolean $flag ) : void
$flag boolean
Résultat void

Property Details

$asset protected_oe property

protected Image,Pimcore\Model\Asset $asset
Résultat Pimcore\Model\Asset\Image

$config protected_oe property

protected Config,Pimcore\Model\Asset\Image\Thumbnail $config
Résultat Pimcore\Model\Asset\Image\Thumbnail\Config

$deferred protected_oe property

protected bool $deferred
Résultat boolean

$embedPicturePolyfill protected_oe static_oe property

protected static bool $embedPicturePolyfill
Résultat boolean

$filesystemPath protected_oe property

protected mixed|string $filesystemPath
Résultat mixed | string

$height protected_oe property

protected int $height
Résultat integer

$mimetype protected_oe property

protected string $mimetype
Résultat string

$pictureElementInUse protected_oe static_oe property

protected static bool $pictureElementInUse
Résultat boolean

$realHeight protected_oe property

protected int $realHeight
Résultat integer

$realWidth protected_oe property

protected int $realWidth
Résultat integer

$width protected_oe property

protected int $width
Résultat integer