SilverWare\Testimonials\Pages\TestimonialPage
An extension of the page class for a testimonial page.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class TestimonialPage
extends Page
implements
ListSource
{
- // constants
- const CORNER_ROUNDED = 'rounded';
- const CORNER_CIRCULAR = 'circular';
- const SORT_ORDER = 'order';
- const SORT_RANDOM = 'random';
- const SORT_RECENT = 'recent';
- // members
- private static string $singular_name = 'Testimonial Page';
- private static string $plural_name = 'Testimonials Page';
- private static string $description = 'Holds a series of testimonials';
- private static string $icon = 'silverware/testimonials: admin/client/dist/images/icons/TestimonialPage.png';
- private static string $table_name = 'SilverWare_TestimonialPage';
- private static array $db = ;
- private static array $has_many = ;
- private static array $defaults = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public DataList getEnabledTestimonials()
- public SS_List getListItems()
- public string getSortOrder()
- public array getSortByOptions()
- public array getImageCornerStyleOptions()
- public string getImageCornerStyleClass()
- public string getNoDataMessage()
Hierarchy
Extends
- Page
Implements
- SilverWare\Lists\ListSource
Constants
Name | Value |
---|---|
CORNER_ROUNDED | 'rounded' |
CORNER_CIRCULAR | 'circular' |
SORT_ORDER | 'order' |
SORT_RANDOM | 'random' |
SORT_RECENT | 'recent' |
Members
private
- $db
—
array
Maps field names to field types for this object. - $defaults
—
array
Defines the default values for the fields of this object. - $description
—
string
Description of this object. - $has_many
—
array
Defines the has-many associations for this object. - $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.
Methods
public
- fieldLabels() — Answers the labels for the fields of the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getEnabledTestimonials() — Answers a list of the enabled testimonials within the receiver.
- getImageCornerStyleClass() — Answers the corner style class for testimonial images.
- getImageCornerStyleOptions() — Answers an array of options for the image corner style field.
- getListItems() — Answers a list of testimonials within the receiver.
- getNoDataMessage() — Answers a message string to be shown when no data is available.
- getSortByOptions() — Answers an array of options for the sort by field.
- getSortOrder() — Answers the sort order for the enabled testimonials.