Cheetah
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ChWsbSocialSharing Class Reference
Inheritance diagram for ChWsbSocialSharing:
ChBaseSocialSharing ChTemplSocialSharing

Public Member Functions

 getCode ($sUrl, $sTitle, $aCustomVars=false)
 

Static Public Member Functions

static getInstance ()
 

Public Attributes

 $_aSocialButtons = array ()
 

Protected Member Functions

 __construct ()
 
 _replaceMarkers ($s, $a)
 
 _getLocaleFacebook ($sLocale)
 
 _getLocalesFacebook ()
 

Detailed Description

Social sharing buttons for any content

It displays sharing buttons from popular social networks, like facebook, twitter, gogole plus, etc.

Example of usage:

ch_import('ChTemplSocialSharing'); echo ChTemplSocialSharing::getInstance()->getCode($sUrl, $sTitle);

Alerts:

Type/unit: system Action: social_sharing_display Options: buttons - reference to buttons array markers - reference to variables for replacement override_output - override output string

Definition at line 32 of file ChWsbSocialSharing.php.

Constructor & Destructor Documentation

◆ __construct()

ChWsbSocialSharing::__construct ( )
protected

Constructor

Reimplemented in ChTemplSocialSharing, ChTemplSocialSharing, ChTemplSocialSharing, and ChBaseSocialSharing.

Definition at line 39 of file ChWsbSocialSharing.php.

Member Function Documentation

◆ _getLocaleFacebook()

ChWsbSocialSharing::_getLocaleFacebook (   $sLocale)
protected

Get most facebook locale for provided language code.

Parameters
$sLanglang code
Returns
locale string or empty string if no lacale is found

Definition at line 88 of file ChWsbSocialSharing.php.

◆ _getLocalesFacebook()

ChWsbSocialSharing::_getLocalesFacebook ( )
protected

Get facebook locales

Returns
locales array, lang is array key and locale is array value

Definition at line 100 of file ChWsbSocialSharing.php.

◆ _replaceMarkers()

ChWsbSocialSharing::_replaceMarkers (   $s,
  $a 
)
protected

Replace provided markers in string.

Parameters
$s- string to replace markers in
$a- markers array
Returns
string with replaces markers

Definition at line 72 of file ChWsbSocialSharing.php.

◆ getCode()

ChWsbSocialSharing::getCode (   $sUrl,
  $sTitle,
  $aCustomVars = false 
)

Reimplemented in ChBaseSocialSharing.

Definition at line 61 of file ChWsbSocialSharing.php.

◆ getInstance()

static ChWsbSocialSharing::getInstance ( )
static

Get object instance

Parameters
$sObjectobject name
Returns
object instance

Definition at line 50 of file ChWsbSocialSharing.php.

Member Data Documentation

◆ $_aSocialButtons

ChWsbSocialSharing::$_aSocialButtons = array ()

Definition at line 34 of file ChWsbSocialSharing.php.


The documentation for this class was generated from the following file: