SilverWare\Slider\Components\SliderComponent
An extension of the base component class for a slider component.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class SliderComponent
extends BaseComponent
{
- // constants
- const CORNER_ROUNDED = 'rounded';
- const CORNER_CIRCULAR = 'circular';
- const MODE_SLIDE = 'slide';
- const MODE_FADE = 'fade';
- // members
- private static string $singular_name = 'Slider Component';
- private static string $plural_name = 'Slider Components';
- private static string $description = 'A component which shows a series of slides';
- private static string $icon = 'silverware/slider: admin/client/dist/images/icons/SliderComponent.png';
- private static string $table_name = 'SilverWare_SliderComponent';
- private static string $hide_ancestor = BaseComponent::class;
- private static string $default_child = Slide::class;
- private static array $db = ;
- private static array $defaults = ;
- private static array|string $allowed_children = ;
- private static array $casting = ;
- private static array $extensions = ;
- private static string $asset_folder = 'Slides/Slider';
- private static string $slide_tag = 'li';
- protected SS_List $slides;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public string getAssetFolder()
- public $this setSlides()
- public DataList getSlides()
- public boolean hasSlides()
- public string getSlideTag()
- public ArrayList getEnabledSlides()
- public array getContentClassNames()
- public array getWrapperAttributes()
- public array getWrapperDataAttributes()
- public string getWrapperAttributesHTML()
- public array getWrapperClassNames()
- public string getWrapperID()
- public string getWrapperCSSID()
- public array getSlideAttributes()
- public array getSlideClassNames()
- public array getImageClassNames()
- public array getCaptionClassNames()
- public string getPreviousIcon()
- public string getNextIcon()
- public string|array|SSViewer getTemplate()
- public boolean isDisabled()
- public array getModeOptions()
- public array getThumbCornerStyleOptions()
- public string getThumbCornerStyleClass()
Hierarchy
Extends
- SilverWare\Components\BaseComponent
Constants
Name | Value |
---|---|
CORNER_ROUNDED | 'rounded' |
CORNER_CIRCULAR | 'circular' |
MODE_SLIDE | 'slide' |
MODE_FADE | 'fade' |
Members
private
- $allowed_children
—
SilverWare\Slider\Components\array|string
Defines the allowed children for this object. - $asset_folder
—
string
Defines the asset folder for uploading images. - $casting
—
array
Maps field and method names to the class names of casting objects. - $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. - $extensions
—
array
Defines the extension classes to apply to this object. - $hide_ancestor
—
string
Defines an ancestor class to hide from the admin interface. - $icon
—
string
Icon file for this object. - $plural_name
—
string
Human-readable plural name. - $singular_name
—
string
Human-readable singular name. - $slide_tag
—
string
Defines the tag to use for slides. - $table_name
—
string
Defines the table name to use for this object.
protected
- $slides
—
SilverStripe\ORM\SS_List
Holds a list of slides which override the child slides.
Methods
public
- fieldLabels() — Answers the labels for the fields of the receiver.
- getAssetFolder() — Answers the asset folder used by the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getCaptionClassNames() — Answers an array of caption class names for the HTML template.
- getContentClassNames() — Answers an array of content class names for the HTML template.
- getEnabledSlides() — Answers a list of the enabled slides within the receiver.
- getImageClassNames() — Answers an array of image class names for the HTML template.
- getModeOptions() — Answers an array of options for the mode field.
- getNextIcon() — Answers the name of the next icon.
- getPreviousIcon() — Answers the name of the previous icon.
- getSlideAttributes() — Answers an array of HTML tag attributes for the slide.
- getSlideClassNames() — Answers an array of slide class names for the HTML template.
- getSlideTag() — Answers the tag for the slides.
- getSlides() — Answers a list of all slides within the receiver.
- getTemplate() — Answers the template used to render the receiver.
- getThumbCornerStyleClass() — Answers the corner style class for thumbnail images.
- getThumbCornerStyleOptions() — Answers an array of options for the thumb corner style field.
- getWrapperAttributes() — Answers an array of HTML tag attributes for the wrapper.
- getWrapperAttributesHTML() — Answers the HTML tag attributes for the wrapper as a string.
- getWrapperCSSID() — Answers a unique CSS ID for the wrapper element.
- getWrapperClassNames() — Answers an array of wrapper class names for the HTML template.
- getWrapperDataAttributes() — Answers an array of data attributes for the wrapper.
- getWrapperID() — Answers a unique ID for the wrapper element.
- hasSlides() — Answers true if the receiver has at least one slide.
- isDisabled() — Answers true if the object is disabled within the template.
- setSlides() — Defines the slides property for the receiver.