SilverWare\Facebook\Buttons\FacebookSharingButton
An extension of the sharing button class for a Facebook 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 FacebookSharingButton
extends SharingButton
{
- // constants
- const LAYOUT_BUTTON = 'button';
- const LAYOUT_BOX_COUNT = 'box_count';
- const LAYOUT_BUTTON_COUNT = 'button_count';
- const SIZE_SMALL = 'small';
- const SIZE_LARGE = 'large';
- // members
- private static string $singular_name = 'Facebook Sharing Button';
- private static string $plural_name = 'Facebook Sharing Buttons';
- private static string $description = 'A sharing button to share the current page via Facebook';
- private static string $table_name = 'SilverWare_FacebookSharingButton';
- 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 array getButtonSizeOptions()
- public array getButtonLayoutOptions()
Hierarchy
Extends
- SilverWare\Social\Model\SharingButton
Constants
Name | Value |
---|---|
LAYOUT_BUTTON | 'button' |
LAYOUT_BOX_COUNT | 'box_count' |
LAYOUT_BUTTON_COUNT | 'button_count' |
SIZE_SMALL | 'small' |
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.
- 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.
- getButtonLayoutOptions() — Answers an array of options for the button layout field.
- getButtonSizeOptions() — Answers an array of options for the button size field.
- getCMSFields() — Answers a list of field objects for the CMS interface.