ThumbnailService
class ThumbnailService (View source)
An internal thumbnail service.
Note that this repository is not part of the public API. Use the asset's getThumbnail() method instead.
Properties
protected ThumbnailRepository | $thumbnailRepository | ||
protected PersistenceManagerInterface | $persistenceManager | ||
protected ResourceManager | $resourceManager | ||
protected array | $formatConversions | ||
protected array | $presets | ||
protected array | $thumbnailCache | ||
protected LoggerInterface | $logger | ||
protected ThrowableStorageInterface | $throwableStorage |
Methods
Returns a thumbnail of the given asset
No description
No description
Create a new thumbnailConfiguration with the identical configuration to the given one PLUS setting of the target-format
Details
ImageInterface|null
getThumbnail(AssetInterface $asset, ThumbnailConfiguration $configuration)
Returns a thumbnail of the given asset
If the maximum width / height is not specified or exceeds the original asset's dimensions, the width / height of the original asset is used.
array
getPresets()
No description
ThumbnailConfiguration
getThumbnailConfigurationForPreset(string $preset, bool $async = false)
No description
protected ThumbnailConfiguration
applyFormatToThumbnailConfiguration(ThumbnailConfiguration $configuration, string $targetFormat)
Create a new thumbnailConfiguration with the identical configuration to the given one PLUS setting of the target-format
void
refreshThumbnail(Thumbnail $thumbnail)
Refreshes a thumbnail and persists the thumbnail
string
getUriForThumbnail(ImageInterface $thumbnail)
No description
void
emitThumbnailPersisted(Thumbnail $thumbnail)
Signals that a thumbnail was persisted.
protected void
emitThumbnailCreated(Thumbnail $thumbnail)
Signals that a thumbnail was created.