class ShareButtons extends AbstractExtension

Twig extension to provide the xhtml code for requested button using: sharebuttons(['SHARE1', 'SHARE2', 'SHARE3', etc.], 'STYLE[distinct|ellipse|toolbar](default distinct)', 'SIZE[lg|md|sm|xs](default md)', 'ALIGNMENT[left|center|right](default center)', DISPLAY_ICON[true|false](default true), DISPLAY_TEXTX[true|false](default false))

Properties

private ShareButtonsServiceInterface $sharebuttonsService Stores the shareButtonsServiceInterface

Methods

__construct(ShareButtonsServiceInterface $sharebuttonsService)

No description

getFunctions()

No description

string
sharebuttons(Environment $environment, $shares, $style = 'distinct', $size = 'md', $alignment = 'center', $displayIcon = true, $displayText = false, $url = null)

Returns the xhtml code for the button

Details

at line 31
__construct(ShareButtonsServiceInterface $sharebuttonsService)

Parameters

ShareButtonsServiceInterface $sharebuttonsService

at line 36
getFunctions()

at line 54
string sharebuttons(Environment $environment, $shares, $style = 'distinct', $size = 'md', $alignment = 'center', $displayIcon = true, $displayText = false, $url = null)

Returns the xhtml code for the button

Parameters

Environment $environment
$shares
$style
$size
$alignment
$displayIcon
$displayText
$url

Return Value

string