SilverCart\Extensions\Assets\ImageExtension
Extension for SilverStripe\Assets\Image.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class ImageExtension
extends DataExtension
{
- // constants
- const IMAGETYPE_ENDING = ;
- // members
- private static array $casting = ;
- // methods
- public void updateSummaryFields()
- public void onAfterUpload()
- public DBHTMLText ImageThumbnail()
- public string getTagWithPreview()
- public Image PadMax()
- public Image PadIfBigger()
- public static Image create_from_path()
- public static string getEndingForType()
- public static string getEndingForFilepath()
- public static string getEndingForFile()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Constants
Name | Value |
---|---|
IMAGETYPE_ENDING |
Members
private
- $casting
—
array
attribute casting
Methods
public
- ImageThumbnail() — Returns the nicely formatted Price of the product.
- PadIfBigger() — Returns a resized version of the image if the image is bigger than the given dimensions.
- PadMax() — Returns a resized version of the image if the image is bigger than the given dimensions.
- create_from_path() — Creates a SilverStripe File using an existing file with the given $sourceFilePath on the filesystem or as an URL.
- getEndingForFile() — Returns the file ending for the given Image.
- getEndingForFilepath() — Returns the file ending for the given filepath.
- getEndingForType() — Returns the file ending for the given PHP image type.
- getTagWithPreview() — Return an XHTML img tag for this Image, or NULL if the image file doesn't exist on the filesystem.
- onAfterUpload() — Will publish the related file right after uploading.
- updateSummaryFields() — Add additional summary fields.