SilverWare\Google\Buttons\GoogleSharingButton
An extension of the sharing button class for a Google sharing button.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class GoogleSharingButton
extends SharingButton
{
- // constants
- const ANNOTATION_NONE = 'none';
- const ANNOTATION_BUBBLE = 'bubble';
- const ANNOTATION_INLINE = 'inline';
- const ANNOTATION_VERTICAL = 'vertical-bubble';
- const SIZE_SMALL = 'small';
- const SIZE_MEDIUM = 'medium';
- const SIZE_LARGE = 'large';
- // members
- private static string $singular_name = 'Google Sharing Button';
- private static string $plural_name = 'Google Sharing Buttons';
- private static string $description = 'A sharing button to share the current page via Google';
- private static string $table_name = 'SilverWare_GoogleSharingButton';
- private static string $hide_ancestor = SharingButton::class;
- private static array $db = ;
- private static array $defaults = ;
- private static array $casting = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public array getButtonAttributes()
- public string getButtonAttributesHTML()
- public array getButtonClassNames()
- public integer getButtonHeight()
- public array getButtonSizeOptions()
- public array getButtonAnnotationOptions()
Hierarchy
Extends
- SilverWare\Social\Model\SharingButton
Constants
Name | Value |
---|---|
ANNOTATION_NONE | 'none' |
ANNOTATION_BUBBLE | 'bubble' |
ANNOTATION_INLINE | 'inline' |
ANNOTATION_VERTICAL | 'vertical-bubble' |
SIZE_SMALL | 'small' |
SIZE_MEDIUM | 'medium' |
SIZE_LARGE | 'large' |
Members
private
- $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. - $defaults
—
array
Defines the default values for the fields of this object. - $description
—
string
Description of this object. - $hide_ancestor
—
string
Defines an ancestor class to hide from the admin interface. - $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.
- getButtonAnnotationOptions() — Answers an array of options for the button annotation field.
- getButtonAttributes() — Answers an array of HTML tag attributes for the button.
- getButtonAttributesHTML() — Answers the HTML tag attributes for the button as a string.
- getButtonClassNames() — Answers an array of button class names for the HTML template.
- getButtonHeight() — Answers the height of the button according to the size setting.
- getButtonSizeOptions() — Answers an array of options for the button size field.
- getCMSFields() — Answers a list of field objects for the CMS interface.