PaulSchulz\SilverStripe\Gallery\Extensions\SiteTreeGalleryExtension
This class is similar to the GalleryExtension class.
The only difference is that this class should only be used for page deriving from SiteTree.
The Title and Content fields have been removed from this extension to prevent duplicate database fields.
Synopsis
class SiteTreeGalleryExtension
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.