\CdnImage
Subclass that overwrites specific behaviour of Image
This class type is switched into place when someone saves an image that has
the CDNFile extension applied
- Author: <marcus@symbiote.com.au>
- License: BSD License http://www.silverstripe.org/bsd-license
Synopsis
class CdnImage
extends Image
{
- // methods
- public void getFormattedImage()
- protected ContentServiceAsset createResampledAsset()
- public void onBeforeWrite()
- public int deleteFormattedImages()
- protected int deleteResamplings()
- public int|string getDimensions()
- private string|int|null getDimensionsFromDB()
- public void storeDimensions()
- public FieldList getCMSFields()
Hierarchy
Extends
- Image
Methods
private
- getDimensionsFromDB() — Get the dimensions of this Image.
protected
- createResampledAsset() — Creates a content service asset object based on a given resampled file path
- deleteResamplings() — Mark content service assets as being deleted, and reset our Resamplings value for update later
public
- deleteFormattedImages() — Deletes all content service asset representations of this item, which will mean they regenerate later
- getCMSFields() — Replaces the Preview Image and Link with secured links if the file is secured.
- getDimensions() — Captures the image dimensions in a db field to avoid needing to download the file all the time
- getFormattedImage()
- onBeforeWrite()
- storeDimensions()