PaulSchulz\SilverStripe\Gallery\Extensions\GalleryExtension
This is the extension for creating a gallery with more information like location and description.
Synopsis
class GalleryExtension
extends ImageCollectionExtension
{
- // members
- private static array $db = ;
- // methods
- public DataObject|null PreviewImage()
- public void updateCMSFields()
- // Inherited methods from ImageCollectionExtension
- protected Config_ForClass getOwnerConfig()
- public int getDesiredHeight()
- public int getOptimizedWidth()
- public DataList SortedImages()
- public SS_List getGalleryImages()
- public ImageLineCollection AdjustImages()
- public ImageLineCollection findQuickImageOrder()
- public ImageLineCollection findBestImageOrder()
- public ImageLine putImagesToLine()
- public void updateCMSFields()
- public DBHTMLText getBiasModeDescription()
Hierarchy
Members
private
- $db
Methods
public
- PreviewImage() — Returns a preview image for this gallery. This is the first image of all images, which are sorted.
- updateCMSFields() — Updates the cms field in $fields.
Inherited from PaulSchulz\SilverStripe\Gallery\Extensions\ImageCollectionExtension
protected
- getOwnerConfig() — This function returns a Config object for the owner of this class.
public
- AdjustImages() — This function returns the images with the best combination of lines, calculated by findBestImageOrder().
- SortedImages() — Returns the images in the correct order specified by the Sort int.
- findBestImageOrder() — Returns an ImageLineCollection with all images, which are put in lines.
- findQuickImageOrder() — Returns an ImageLineCollection with all images, which are put in lines.
- getBiasModeDescription() — Returns a description for all bias modes. Useful for description of cms fields.
- getDesiredHeight() — Returns the desired height a line should have. The actually height can be slightly different through the calculation process.
- getGalleryImages() — Wraps the images of this DataObject into a GalleryImage object for further processing.
- getOptimizedWidth() — Returns the optimized width a line has.
- putImagesToLine() — Puts as many images from $images into one line as they can fit into the line.
- updateCMSFields() — Updates the cms fields in $fields.