SilverWare\Twitter\Buttons\TwitterFollowButton
An extension of the base component class for a Twitter follow button.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2018 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class TwitterFollowButton
extends BaseComponent
{
- // constants
- const SIZE_DEFAULT = 'default';
- const SIZE_LARGE = 'large';
- // members
- private static string $singular_name = 'Twitter Follow Button';
- private static string $plural_name = 'Twitter Follow Buttons';
- private static string $description = 'A component which shows a Twitter follow button';
- private static string $icon = 'silverware/twitter: admin/client/dist/images/icons/TwitterFollowButton.png';
- private static string $table_name = 'SilverWare_TwitterFollowButton';
- private static string $hide_ancestor = BaseComponent::class;
- private static array|string $allowed_children = 'none';
- private static array $db = ;
- private static array $defaults = ;
- private static array $casting = ;
- // methods
- public FieldList getCMSFields()
- public RequiredFields getCMSValidator()
- public array fieldLabels()
- public void onBeforeWrite()
- public array getLinkAttributes()
- public array getLinkDataAttributes()
- public string getLinkAttributesHTML()
- public string getLinkURL()
- public string getText()
- public boolean isDisabled()
- public array getSizeOptions()
Hierarchy
Extends
- SilverWare\Components\BaseComponent
Constants
Name | Value |
---|---|
SIZE_DEFAULT | 'default' |
SIZE_LARGE | 'large' |
Members
private
- $allowed_children
—
SilverWare\Twitter\Buttons\array|string
Defines the allowed children for this object. - $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. - $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.
- getCMSValidator() — Answers a validator for the CMS interface.
- getLinkAttributes() — Answers an array of attributes for the link.
- getLinkAttributesHTML() — Answers a string of attributes for the link.
- getLinkDataAttributes() — Answers an array of data attributes for the link.
- getLinkURL() — Answers the link URL for the receiver.
- getSizeOptions() — Answers an array of options for the size field.
- getText() — Answers the text for the link in the template.
- isDisabled() — Answers true if the object is disabled within the template.
- onBeforeWrite() — Event method called before the receiver is written to the database.