SilverWare\Social\Model\SharingIcon
An extension of the component class for a 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 SharingIcon
extends Component
{
- // constants
- const PLACEMENT_AUTO = 'auto';
- const PLACEMENT_TOP = 'top';
- const PLACEMENT_LEFT = 'left';
- const PLACEMENT_RIGHT = 'right';
- const PLACEMENT_BOTTOM = 'bottom';
- // members
- private static string $singular_name = 'Sharing Icon';
- private static string $plural_name = 'Sharing Icons';
- private static string $description = 'A component which represents a sharing icon';
- private static string $icon = 'silverware/social: admin/client/dist/images/icons/SharingIcon.png';
- private static string $table_name = 'SilverWare_SharingIcon';
- private static string $hide_ancestor = Component::class;
- private static array|string $allowed_children = 'none';
- private static array $extensions = ;
- private static array $icon_sizes = ;
- private static integer $default_icon_size = 32;
- private static string $default_placement = 'auto';
- private static $button_class;
- // methods
- public RequiredFields getCMSValidator()
- public array getAttributes()
- public array getDataAttributes()
- public array getClassNames()
- public string getIconSizeClass()
- public string getPlacement()
- public DBHTMLText|string renderSelf()
- public DBHTMLText|string renderContent()
- public array getIconSizeOptions()
- public array getPlacementOptions()
- public SharingButton getButton()
Hierarchy
Extends
- SilverWare\Model\Component
Constants
Name | Value |
---|---|
PLACEMENT_AUTO | 'auto' |
PLACEMENT_TOP | 'top' |
PLACEMENT_LEFT | 'left' |
PLACEMENT_RIGHT | 'right' |
PLACEMENT_BOTTOM | 'bottom' |
Members
private
- $allowed_children
—
SilverWare\Social\Model\array|string
Defines the allowed children for this object. - $default_icon_size
—
integer
Defines the default size of an icon (in pixels). - $default_placement
—
integer
Defines the default placement of an icon popover. - $description
—
string
Description of this object. - $extensions
—
array
Defines the extension classes to apply to this object. - $hide_ancestor
—
string
Defines an ancestor class to hide from the admin interface. - $icon
—
string
Icon file for this object. - $icon_sizes
—
array
Defines the available icon sizes (in pixels). - $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
- getAttributes() — Answers an array of HTML tag attributes for the object.
- getButton() — Answers the sharing button instance for the receiver.
- getCMSValidator() — Answers a validator for the CMS interface.
- getClassNames() — Answers an array of class names for the HTML template.
- getDataAttributes() — Answers an array of data attributes for the receiver.
- getIconSizeClass() — Answers the icon size class for the receiver.
- getIconSizeOptions() — Answers an array of options for an icon size field.
- getPlacement() — Answers the popover placement for the receiver.
- getPlacementOptions() — Answers an array of options for a placement field.
- renderContent() — Renders the content for the HTML template.
- renderSelf() — Renders the component for the HTML template.