PHP Class kartik\social\Widget

Since: 1.0
Author: Kartik Visweswaran ([email protected])
Inheritance: extends yii\base\Widget
Datei anzeigen Open project: kartik-v/yii2-social Class Usage Examples

Public Properties

Property Type Description
$content the content to be embedded in between the plugin tag
$dataApiPrefix text to be prefixed for the data api
$i18n the the internalization configuration for this widget
$language the language used in displaying content. If not provided, defaults to en_US.
$moduleName the name of the module
$noscript text to be displayed if browser does not support javascript. If set to false will not displayed;
$noscriptOptions HTML attributes for the noscript message container
$options the HTML attributes for the plugin container.
$settings the social plugin settings
$tag the tag for enclosing the plugin. Defaults to 'div'.
$type the social plugin type

Protected Properties

Property Type Description
$validPlugins the valid plugins

Public Methods

Method Description
getConfig ( string $widget ) : array Gets configuration for a widget from the module
init ( ) Initialize the widget
setConfig ( string $widget ) Sets configuration for a widget based on the module level configuration

Protected Methods

Method Description
renderNoScript ( ) : string Generates the noscript container
renderPlugin ( ) : string Generates the plugin markup
setPluginOptions ( boolean $convertLowerCase = true ) Sets the options for the plugin

Method Details

getConfig() public method

Gets configuration for a widget from the module
public getConfig ( string $widget ) : array
$widget string name of the widget
return array

init() public method

Initialize the widget
public init ( )

renderNoScript() protected method

Generates the noscript container
protected renderNoScript ( ) : string
return string

renderPlugin() protected method

Generates the plugin markup
protected renderPlugin ( ) : string
return string

setConfig() public method

Sets configuration for a widget based on the module level configuration
public setConfig ( string $widget )
$widget string name of the widget

setPluginOptions() protected method

Sets the options for the plugin
protected setPluginOptions ( boolean $convertLowerCase = true )
$convertLowerCase boolean

Property Details

$content public_oe property

the content to be embedded in between the plugin tag
public $content

$dataApiPrefix public_oe property

text to be prefixed for the data api
public $dataApiPrefix

$i18n public_oe property

the the internalization configuration for this widget
public $i18n

$language public_oe property

the language used in displaying content. If not provided, defaults to en_US.
public $language

$moduleName public_oe property

the name of the module
public $moduleName

$noscript public_oe property

text to be displayed if browser does not support javascript. If set to false will not displayed;
public $noscript

$noscriptOptions public_oe property

HTML attributes for the noscript message container
public $noscriptOptions

$options public_oe property

the HTML attributes for the plugin container.
public $options

$settings public_oe property

the social plugin settings
public $settings

$tag public_oe property

the tag for enclosing the plugin. Defaults to 'div'.
public $tag

$type public_oe property

the social plugin type
public $type

$validPlugins protected_oe property

the valid plugins
protected $validPlugins