SilverWare\Social\Components\SharingComponent
An extension of the base component class for a sharing 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 SharingComponent
extends BaseComponent
{
- // constants
- const LAYOUT_VERTICAL = 'vertical';
- const LAYOUT_HORIZONTAL = 'horizontal';
- // members
- private static string $singular_name = 'Sharing Component';
- private static string $plural_name = 'Sharing Components';
- private static string $description = 'A component which shows a series of sharing buttons for the current page';
- private static string $icon = 'silverware/social: admin/client/dist/images/icons/SharingComponent.png';
- private static string $table_name = 'SilverWare_SharingComponent';
- private static string $hide_ancestor = BaseComponent::class;
- private static array $db = ;
- private static array $defaults = ;
- private static array|string $allowed_children = ;
- private static array $disabled_on = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public array getListClassNames()
- public array getListItemClassNames()
- public DataList getButtons()
- public ArrayList getEnabledButtons()
- public boolean isDisabled()
- public array getButtonLayoutOptions()
Hierarchy
Extends
- SilverWare\Components\BaseComponent
Constants
Name | Value |
---|---|
LAYOUT_VERTICAL | 'vertical' |
LAYOUT_HORIZONTAL | 'horizontal' |
Members
private
- $allowed_children
—
SilverWare\Social\Components\array|string
Defines the allowed children for this object. - $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. - $disabled_on
—
array
Defines the page classes to disable the object by default. - $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.
- getButtonLayoutOptions() — Answers an array of options for the button layout field.
- getButtons() — Answers a list of all buttons within the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getEnabledButtons() — Answers a list of the enabled buttons within the receiver.
- getListClassNames() — Answers an array of list class names for the HTML template.
- getListItemClassNames() — Answers an array of list item class names for the HTML template.
- isDisabled() — Answers true if the object is disabled within the template.