SilverStripe\Assets\Tests\FileTest\MyCustomFile

Synopsis

class MyCustomFile extends File implements TestOnly {
  • // Inherited constants from File
  • const EDIT_ALL = 'FILE_EDIT_ALL';
  • // members
  • private static string $table_name = 'FileTest_MyCustomFile';
}

Hierarchy

Extends

Implements

  • SilverStripe\Dev\TestOnly

Tasks

Line Task
1214 - Implement PolymorphicManyManyList to replace this

Constants

Name Value
EDIT_ALL 'FILE_EDIT_ALL'

Members

private

  • $table_name

protected

Methods

Inherited from SilverStripe\Assets\File

protected

public

Inherited from SilverStripe\Assets\ImageManipulation

protected

  • castDimension() — Validate a width or size is valid and casts it to integer

public

  • CMSThumbnail() — Default CMS thumbnail
  • CropHeight() — Crop image on Y axis if it exceeds specified height. Retain width.
  • CropWidth() — Crop image on X axis if it exceeds specified width. Retain height.
  • Fill() — Resize and crop image to fill specified dimensions.
  • FillMax() — Crop this image to the aspect ratio defined by the specified width and height, then scale down the image to those dimensions if it exceeds them.
  • Fit() — Scale image proportionally to fit within the specified bounds
  • FitMax() — Proportionally scale down this image if it is wider or taller than the specified dimensions.
  • IconTag() — Get HTML for img containing the icon for this file
  • Pad() — Fit image to specified dimensions and fill leftover space with a solid colour (default white). Use in templates with $Pad.
  • PreviewThumbnail() — Get preview for this file
  • Resampled() — Forces the image to be resampled, if possible
  • ResizedImage() — Generate a resized copy of this image with the given width & height.
  • ScaleHeight() — Scale image proportionally by height. Use in templates with $ScaleHeight.
  • ScaleMaxHeight() — Proportionally scale down this image if it is taller than the specified height.
  • ScaleMaxWidth() — Proportionally scale down this image if it is wider than the specified width.
  • ScaleWidth() — Scale image proportionally by width. Use in templates with $ScaleWidth.
  • StripThumbnail() — Generates a thumbnail for use in the gridfield view
  • Thumbnail() — Default thumbnail generation for Images
  • ThumbnailIcon() — Thubnail generation for all file types.
  • ThumbnailURL() — Get URL to thumbnail of the given size.
  • existingOnly() — Return clone of self which promises to only return existing thumbnails
  • exists() — Determine if this container has a valid value
  • getAbsoluteSize() — Return file size in bytes.
  • getAbsoluteURL()
  • getAllowGeneration() — Check if resizes are allowed
  • getFilename() — Get value of filename
  • getHash() — Get value of hash
  • getHeight() — Get the height of this image.
  • getIcon() — Return the relative URL of an icon for the file type, based on the {@link appCategory()} value.
  • getImageBackend() — Get Image_Backend instance for this image
  • getIsImage() — Determine if a valid non-empty image exists behind this asset
  • getMetaData() — Get metadata for this file
  • getMimeType() — Get mime type
  • getOrientation() — Get the orientation of this image.
  • getStream()
  • getString()
  • getURL()
  • getVariant() — Get value of variant
  • getWidth() — Get the width of this image.
  • isHeight() — Determine if this image is of the specified width
  • isSize() — Determine if this image is of the specified size
  • isWidth() — Determine if this image is of the specified width
  • manipulate() — Generate a new DBFile instance using the given callback if it hasn't been created yet, or return the existing one if it has.
  • manipulateImage() — Wrapper for manipulate that passes in and stores Image_Backend objects instead of tuples
  • setAllowGeneration() — Set whether image resizes are allowed
  • updateURL() — Update the url to point to a resampled version if forcing
  • variantName() — Name a variant based on a format with arbitrary parameters