SilverWare\Gallery\Pages\GalleryAlbum
An extension of the page class for a gallery album.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class GalleryAlbum
extends Page
implements
ListSource
{
- // constants
- const COVER_AUTO = 'auto';
- const COVER_FIRST = 'first';
- const COVER_RANDOM = 'random';
- const COVER_LATEST = 'latest';
- const SORT_ORDER = 'order';
- const SORT_ALPHA = 'alpha';
- const SORT_LATEST = 'latest';
- const SORT_RANDOM = 'random';
- // members
- private static string $singular_name = 'Gallery Album';
- private static string $plural_name = 'Gallery Albums';
- private static string $description = 'An album within a gallery which holds a series of images';
- private static string $icon = 'silverware/gallery: admin/client/dist/images/icons/GalleryAlbum.png';
- private static string $table_name = 'SilverWare_GalleryAlbum';
- private static string $default_child = GalleryImage::class;
- private static boolean $can_be_root = false;
- private static array $db = ;
- private static array $defaults = ;
- private static array|string $allowed_children = ;
- private static array $extensions = ;
- private static array $meta_fields = ;
- private static array $detail_fields = ;
- private static string $meta_date_format = 'd MMMM Y';
- private static boolean $detail_fields_inline = true;
- private static boolean $detail_fields_hide_header = true;
- private static boolean $detail_fields_hide_names = true;
- private static string $list_component_class = MasonryComponent::class;
- private static string $image_links_to = BaseListComponent::IMAGE_LINK_FILE;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public void populateDefaults()
- public string getMetaTitle()
- public Image getMetaImage()
- public string getMetaImageFolder()
- public string getFolderName()
- public Gallery getGallery()
- public string getPrevLink()
- public string getNextLink()
- public DataList getImages()
- public DataList getSortedImages()
- public GalleryImage getFirstImage()
- public GalleryImage getLatestImage()
- public GalleryImage getRandomImage()
- public integer getImageCount()
- public string getNumberOfImages()
- public DataList getListItems()
- public BaseListComponent getListComponent()
- public boolean getDateShown()
- public array getCoverModeOptions()
- public array getSortImagesByOptions()
- public string getDefaultURLSegment()
Hierarchy
Extends
- Page
Implements
- SilverWare\Lists\ListSource
Constants
Name | Value |
---|---|
COVER_AUTO | 'auto' |
COVER_FIRST | 'first' |
COVER_RANDOM | 'random' |
COVER_LATEST | 'latest' |
SORT_ORDER | 'order' |
SORT_ALPHA | 'alpha' |
SORT_LATEST | 'latest' |
SORT_RANDOM | 'random' |
Members
private
- $allowed_children
—
SilverWare\Gallery\Pages\array|string
Defines the allowed children for this object. - $can_be_root
—
boolean
Determines whether this object can exist at the root level. - $db
—
array
Maps field names to field types for this object. - $default_child
—
string
Defines the default child class for this object. - $defaults
—
array
Defines the default values for the fields of this object. - $description
—
string
Description of this object. - $detail_fields
—
array
Defines the detail fields to show for the object. - $detail_fields_hide_header
—
boolean
Defines the setting for hiding the detail fields header. - $detail_fields_hide_names
—
boolean
Defines the setting for hiding the detail field names. - $detail_fields_inline
—
boolean
Defines the setting for showing the detail fields inline. - $extensions
—
array
Defines the extension classes to apply to this object. - $icon
—
string
Icon file for this object. - $image_links_to
—
string
Defines the mode for image links within the album. - $list_component_class
—
string
Defines the list component class to use. - $meta_date_format
—
string
Defines the format for the meta date field. - $meta_fields
—
array
Defines the meta field configuration for the object. - $plural_name
—
string
Human-readable plural name. - $singular_name
—
string
Human-readable singular name. - $table_name
—
string
Defines the table name to use for this object.
Methods
public
- fieldLabels() — Answers the labels for the fields of the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getCoverModeOptions() — Answers an array of options for the cover mode field.
- getDateShown() — Answers true if the date is to be shown.
- getDefaultURLSegment() — Answers the default URL segment for the receiver.
- getFirstImage() — Answers the first image added to the album.
- getFolderName() — Answers the asset folder name for the receiver.
- getGallery() — Answers the parent gallery of the receiver.
- getImageCount() — Answers the number of images within the receiver.
- getImages() — Answers a list of images within the gallery album.
- getLatestImage() — Answers the latest image added to the album.
- getListComponent() — Answers the list component for the template.
- getListItems() — Answers a list of images within the receiver.
- getMetaImage() — Answers the meta image for the object.
- getMetaImageFolder() — Answers the name of the asset folder used for uploading images.
- getMetaTitle() — Answers the meta title for the object.
- getNextLink() — Answers a link for the image after the given image.
- getNumberOfImages() — Answers a string describing the number of images within the receiver.
- getPrevLink() — Answers a link for the image before the given image.
- getRandomImage() — Answers an image at random from the album.
- getSortImagesByOptions() — Answers an array of options for the sort images by field.
- getSortedImages() — Answers a sorted list of images within the gallery album.
- populateDefaults() — Populates the default values for the fields of the receiver.