abstract class AbstractThumbnailGenerator implements ThumbnailGeneratorInterface (View source)

Abstract Thumbnail Generator

A Thumbnail Generator is used to generate thumbnail based on constraints, like priority, file extension, ... You can implement your own Generator. The output of a Generator must be an image, check existing Generators for inspiration.

Properties

protected Environment $environment
protected ImagineInterface $imagineService
protected ResourceManager $resourceManager
static protected int $priority

The priority for this thumbnail generator.

protected array $options

Methods

static int
getPriority()

No description

mixed
getOption(string $key)

No description

bool
canRefresh(Thumbnail $thumbnail)

No description

bool
isExtensionSupported(Thumbnail $thumbnail)

No description

Details

static int getPriority()

No description

Return Value

int

protected mixed getOption(string $key)

No description

Parameters

string $key

Return Value

mixed

Exceptions

Exception

bool canRefresh(Thumbnail $thumbnail)

No description

Parameters

Thumbnail $thumbnail

Return Value

bool

true if this ThumbnailGenerator can convert the given thumbnail, false otherwise.

protected bool isExtensionSupported(Thumbnail $thumbnail)

No description

Parameters

Thumbnail $thumbnail

Return Value

bool