PHP Класс Pimcore\Model\Asset\Image\Thumbnail

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
createConfig ( mixed $selector ) : Config Get a thumbnail image configuration.

Описание методов

__construct() публичный Метод

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

__toString() публичный Метод

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
Результат string Public path to thumbnail image.

createConfig() защищенный Метод

Get a thumbnail image configuration.
protected createConfig ( mixed $selector ) : Config
$selector mixed Name, array or object describing a thumbnail configuration.
Результат Pimcore\Model\Asset\Image\Thumbnail\Config

generate() публичный Метод

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

getAsset() публичный Метод

public getAsset ( ) : Image
Результат Pimcore\Model\Asset\Image The original image from which this thumbnail is generated.

getChecksum() публичный Метод

public getChecksum ( string $type = "md5" ) : null | string
$type string
Результат null | string

getConfig() публичный Метод

Get thumbnail image configuration.
public getConfig ( ) : Config
Результат Pimcore\Model\Asset\Image\Thumbnail\Config

getDimensions() публичный Метод

public getDimensions ( ) : array
Результат array

getEmbedPicturePolyfill() публичный статический Метод

public static getEmbedPicturePolyfill ( ) : boolean
Результат boolean

getFileExtension() публичный Метод

public getFileExtension ( ) : string
Результат string

getFileSystemPath() публичный Метод

public getFileSystemPath ( boolean $deferredAllowed = false ) : mixed | string
$deferredAllowed boolean
Результат mixed | string

getHTML() публичный Метод

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
Результат string IMG-element with at least the attributes src, width, height, alt.

getHeight() публичный Метод

Get the width of the generated thumbnail image in pixels.
public getHeight ( ) : integer
Результат integer Height of the generated thumbnail image.

getMedia() публичный Метод

public getMedia ( string $name, integer $highRes = 1 ) : Thumbnail
$name string
$highRes integer
Результат Thumbnail

getMimeType() публичный Метод

Get the height of the generated thumbnail image in pixels.
public getMimeType ( ) : string
Результат string HTTP Mime Type of the generated thumbnail image.

getPath() публичный Метод

public getPath ( boolean $deferredAllowed = true ) : mixed | string
$deferredAllowed boolean
Результат mixed | string

getRealHeight() публичный Метод

Get the real width of the generated thumbnail image in pixels. (when using high resolution option)
public getRealHeight ( ) : integer
Результат integer Height of the generated thumbnail image.

getRealWidth() публичный Метод

public getRealWidth ( ) : integer
Результат integer real Width of the generated thumbnail image. (when using high resolution option)

getWidth() публичный Метод

public getWidth ( ) : integer
Результат integer Width of the generated thumbnail image.

isPictureElementInUse() публичный статический Метод

public static isPictureElementInUse ( ) : boolean
Результат boolean

reset() публичный Метод

public reset ( )

setEmbedPicturePolyfill() публичный статический Метод

public static setEmbedPicturePolyfill ( boolean $embedPicturePolyfill )
$embedPicturePolyfill boolean

setPictureElementInUse() публичный статический Метод

Enables, when set to true, dispatchLoopShutdown of Pimcore_Controller_Plugin_Thumbnail
public static setPictureElementInUse ( boolean $flag ) : void
$flag boolean
Результат void

Описание свойств

$asset защищенное свойство

protected Image,Pimcore\Model\Asset $asset
Результат Pimcore\Model\Asset\Image

$config защищенное свойство

protected Config,Pimcore\Model\Asset\Image\Thumbnail $config
Результат Pimcore\Model\Asset\Image\Thumbnail\Config

$deferred защищенное свойство

protected bool $deferred
Результат boolean

$embedPicturePolyfill защищенное статическое свойство

protected static bool $embedPicturePolyfill
Результат boolean

$filesystemPath защищенное свойство

protected mixed|string $filesystemPath
Результат mixed | string

$height защищенное свойство

protected int $height
Результат integer

$mimetype защищенное свойство

protected string $mimetype
Результат string

$pictureElementInUse защищенное статическое свойство

protected static bool $pictureElementInUse
Результат boolean

$realHeight защищенное свойство

protected int $realHeight
Результат integer

$realWidth защищенное свойство

protected int $realWidth
Результат integer

$width защищенное свойство

protected int $width
Результат integer