SilverWare\Carousel\Components\CarouselComponent
An extension of the base component class for a carousel 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 CarouselComponent
extends BaseComponent
{
- // members
- private static string $singular_name = 'Carousel Component';
- private static string $plural_name = 'Carousel Components';
- private static string $description = 'A component which shows a carousel of slides';
- private static string $icon = 'silverware/carousel: admin/client/dist/images/icons/CarouselComponent.png';
- private static string $table_name = 'SilverWare_CarouselComponent';
- 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/Carousel';
- protected SS_List $slides;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public string getAssetFolder()
- public string getHeadingTag()
- public $this setSlides()
- public DataList getSlides()
- public boolean hasSlides()
- public ArrayList getEnabledSlides()
- public array getWrapperAttributes()
- public array getWrapperDataAttributes()
- public string getWrapperAttributesHTML()
- public array getWrapperClassNames()
- public string getWrapperID()
- public string getWrapperCSSID()
- public array getInnerClassNames()
- public array getControlsClassNames()
- public array getControlPreviousClassNames()
- public array getControlPreviousIconClassNames()
- public array getControlNextClassNames()
- public array getControlNextIconClassNames()
- public array getControlTextClassNames()
- public array getIndicatorsClassNames()
- public string getIndicatorClass()
- public string getControlPreviousText()
- public string getControlNextText()
- public boolean getControlsShown()
- public boolean getIndicatorsShown()
- public array getSlideClassNames()
- public array getImageClassNames()
- public array getCaptionClassNames()
- public string|array|SSViewer getTemplate()
- public boolean isDisabled()
Hierarchy
Extends
- SilverWare\Components\BaseComponent
Members
private
- $allowed_children
—
SilverWare\Carousel\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. - $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.
- getControlNextClassNames() — Answers an array of next control class names for the HTML template.
- getControlNextIconClassNames() — Answers an array of next control icon class names for the HTML template.
- getControlNextText() — Answers the text for the next control.
- getControlPreviousClassNames() — Answers an array of previous control class names for the HTML template.
- getControlPreviousIconClassNames() — Answers an array of previous control icon class names for the HTML template.
- getControlPreviousText() — Answers the text for the previous control.
- getControlTextClassNames() — Answers an array of control text class names for the HTML template.
- getControlsClassNames() — Answers an array of controls class names for the HTML template.
- getControlsShown() — Answers true if the controls are to be shown in the template.
- getEnabledSlides() — Answers a list of the enabled slides within the receiver.
- getHeadingTag() — Answers the heading tag for the receiver.
- getImageClassNames() — Answers an array of image class names for the HTML template.
- getIndicatorClass() — Answers the class for an indicator list item.
- getIndicatorsClassNames() — Answers an array of indicators class names for the HTML template.
- getIndicatorsShown() — Answers true if the indicators are to be shown in the template.
- getInnerClassNames() — Answers an array of inner class names for the HTML template.
- getSlideClassNames() — Answers an array of slide class names for the HTML template.
- getSlides() — Answers a list of all slides within the receiver.
- getTemplate() — Answers the template used to render the receiver.
- 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.