class Thumbnail (View source)

Methods

__construct($asset, null $config = null, bool $deferred = true)

No description

mixed|string
getPath(bool $deferredAllowed = true)

No description

mixed|string
getFileSystemPath(bool $deferredAllowed = false)

No description

generate(bool $deferredAllowed = true)

No description

reset()

No description

string
__toString()

Get the public path to the thumbnail image.

int
getWidth()

No description

int
getHeight()

Get the width of the generated thumbnail image in pixels.

int
getRealWidth()

No description

int
getRealHeight()

Get the real width of the generated thumbnail image in pixels. (when using high resolution option)

array
getDimensions()

No description

string
getMimeType()

Get the height of the generated thumbnail image in pixels.

string
getFileExtension()

No description

string
getHTML(array $options = array(), array $removeAttributes = array())

Get generated HTML for displaying the thumbnail image in a HTML document. (XHTML compatible).

getMedia(string $name, int $highRes = 1)

No description

getAsset()

No description

getConfig()

Get thumbnail image configuration.

null|string
getChecksum(string $type = 'md5')

No description

static bool
isPictureElementInUse()

No description

static void
setPictureElementInUse(bool $flag)

Enables, when set to true, dispatchLoopShutdown of PimcoreControllerPlugin_Thumbnail

static boolean
getEmbedPicturePolyfill()

No description

static 
setEmbedPicturePolyfill(boolean $embedPicturePolyfill)

No description

Details

at line line 84
__construct($asset, null $config = null, bool $deferred = true)

Parameters

$asset
null $config
bool $deferred

at line line 95
mixed|string getPath(bool $deferredAllowed = true)

Parameters

bool $deferredAllowed

Return Value

mixed|string

at line line 117
mixed|string getFileSystemPath(bool $deferredAllowed = false)

Parameters

bool $deferredAllowed

Return Value

mixed|string

at line line 129
generate(bool $deferredAllowed = true)

Parameters

bool $deferredAllowed

at line line 162
reset()

at line line 177
string __toString()

Get the public path to the thumbnail image.

This method is here for backwards compatility. Up to Pimcore 1.4.8 a thumbnail was returned as a path to an image.

Return Value

string Public path to thumbnail image.

at line line 185
int getWidth()

Return Value

int Width of the generated thumbnail image.

at line line 198
int getHeight()

Get the width of the generated thumbnail image in pixels.

Return Value

int Height of the generated thumbnail image.

at line line 210
int getRealWidth()

Return Value

int real Width of the generated thumbnail image. (when using high resolution option)

at line line 223
int getRealHeight()

Get the real width of the generated thumbnail image in pixels. (when using high resolution option)

Return Value

int Height of the generated thumbnail image.

at line line 235
array getDimensions()

Return Value

array

at line line 282
string getMimeType()

Get the height of the generated thumbnail image in pixels.

Return Value

string HTTP Mime Type of the generated thumbnail image.

at line line 324
string getFileExtension()

Return Value

string

at line line 356
string getHTML(array $options = array(), array $removeAttributes = array())

Get generated HTML for displaying the thumbnail image in a HTML document. (XHTML compatible).

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.

Parameters

array $options Custom configurations and HTML attributes.
array $removeAttributes Listof key-value pairs of HTML attributes that should be removed

Return Value

string IMG-element with at least the attributes src, width, height, alt.

at line line 544
Thumbnail getMedia(string $name, int $highRes = 1)

Parameters

string $name
int $highRes

Return Value

Thumbnail

Exceptions

Exception

at line line 565
Image getAsset()

Return Value

Image The original image from which this thumbnail is generated.

at line line 574
Config getConfig()

Get thumbnail image configuration.

Return Value

Config

at line line 584
null|string getChecksum(string $type = 'md5')

Parameters

string $type

Return Value

null|string

Exceptions

Exception

at line line 613
static bool isPictureElementInUse()

Return Value

bool

at line line 623
static void setPictureElementInUse(bool $flag)

Enables, when set to true, dispatchLoopShutdown of PimcoreControllerPlugin_Thumbnail

Parameters

bool $flag

Return Value

void

at line line 631
static boolean getEmbedPicturePolyfill()

Return Value

boolean

at line line 639
static setEmbedPicturePolyfill(boolean $embedPicturePolyfill)

Parameters

boolean $embedPicturePolyfill