Frontend | Backend | Api

Files\Models\Frontend\ImageRevision

ImageRevision

Method Description Returns
getResized(?int|null $width, ?int|null $height, string $resizeStrategy) Get a resized version of the active revision of the image TransformedImage
getMimeType() Get the mime type of the image revision string
getFormat() Get the format of the image revision string
getAspectRation() Get the aspect ration for the image revision based on the images width and height float
isActiveRevision() Check if the revision is the active revision bool
isBlank() Return the information that this is not a revision of the blank image bool
getId() int
getWidth() Get the width of the image in pixels int
getHeight() Get the height of the image in pixels int
getName() Get the name of the image revision - this is usually used as ALT text string
getText() Get the description of the image revision - this is usually only used internally, e.g. to explain changes in a new revision string
getCreated() Get the date the record was created. DateTime
getModified() Get the last modification date for the record. DateTime
getCreatedBy() User
getModifiedBy() User
getImage() Image
getVirtualFile() VirtualFile
isNewRecord() Check if the record is a new record bool
isHierarchicalModel() Check whether a model is a hierarchical model, i.e. can have children bool
isVersionedModel() Check whether a model is versioned bool