PHP Class Social\Plugin\AddThisWidget

Inheritance: extends Gc\Module\AbstractPlugin
Show file Open project: gotcms/gotcms

Protected Properties

Property Type Description
$addthis Social\Model\AddThis AddThis model
$config array Configuration

Public Methods

Method Description
__construct ( ) Constructor, prepare addthis widget and configuration
__invoke ( string $identifier, string $title = '', string $url = '' ) : string Render addthis widget
getConfig ( ) : string Generate configuration

Protected Methods

Method Description
customToolbox ( array $options, string $addthisIdentifier ) : string Buil custom toolbox
mergeConfigWithJsonConfig ( string $appendString, array $addthisConfig, string $jsonConfig ) : string Merge the Add this settings with that given using JSON format

Method Details

__construct() public method

Constructor, prepare addthis widget and configuration
public __construct ( )

__invoke() public method

Render addthis widget
public __invoke ( string $identifier, string $title = '', string $url = '' ) : string
$identifier string Widget identifier
$title string Title used for addthis share
$url string Url used for addthis share
return string

customToolbox() protected method

Buil custom toolbox
protected customToolbox ( array $options, string $addthisIdentifier ) : string
$options array Array containing all options
$addthisIdentifier string Add this identifier
return string

getConfig() public method

Generate configuration
public getConfig ( ) : string
return string

mergeConfigWithJsonConfig() protected method

Merge the Add this settings with that given using JSON format
protected mergeConfigWithJsonConfig ( string $appendString, array $addthisConfig, string $jsonConfig ) : string
$appendString string The string to build and return the script
$addthisConfig array The setting array for add this config
$jsonConfig string The JSON String
return string The string to build and return the script

Property Details

$addthis protected property

AddThis model
protected AddThis,Social\Model $addthis
return Social\Model\AddThis

$config protected property

Configuration
protected array $config
return array