\CdnImage_Cached
A resized / processed {@link Image} object.
When Image object are processed or resized, a suitable Image_Cached object is returned, pointing to the
cached copy of the processed image.
Synopsis
class CdnImage_Cached
extends CdnImage
{
- // methods
- public void __construct()
- public bool exists()
- public void getRelativePath()
- public false requireTable()
- public void write()
- // Inherited methods from CdnImage
- public void getFormattedImage()
- protected ContentServiceAsset createResampledAsset()
- public void onBeforeWrite()
- public int deleteFormattedImages()
- protected int deleteResamplings()
- public int|string getDimensions()
- public void storeDimensions()
- public FieldList getCMSFields()
Hierarchy
Extends
Methods
public
- __construct() — Create a new cached image.
- exists() — Override the parent's exists method becuase the ID is explicitly set to -1 on a cached image we can't use the default check
- getRelativePath()
- requireTable() — Prevent creating new tables for the cached record
- write() — Prevent writing the cached image to the database
Inherited from CdnImage
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()