PHP Class kartik\social\GithubPlugin

Usage: echo GithubPlugin::widget([ 'type' => GithubPlugin::WATCH, 'settings' => ['user' => 'GITHUB_USER', 'repo' => 'GITHUB_REPO'] ]);
See also: http://ghbtns.com/
Since: 1.0
Author: Kartik Visweswaran ([email protected])
Inheritance: extends Widget
Datei anzeigen Open project: kartik-v/yii2-social Class Usage Examples

Public Properties

Property Type Description
$options the HTML attributes for the plugin container.
$settings the social plugin settings. The following attributes are recognized: - repo: string the Github repository name. This is mandatory. - user: string the Github username that owns the repo. This is mandatory. - count: boolean whether to display the watchers or forks count. - size: the flag for using a larger button. The larger button option is 'large'.
$type the type of button. One of 'watch', 'fork', 'follow'. This is mandatory.

Protected Properties

Property Type Description
$validPlugins the valid plugins

Public Methods

Method Description
init ( ) Initialize the widget

Method Details

init() public method

Initialize the widget
public init ( )

Property Details

$options public_oe property

the HTML attributes for the plugin container.
public $options

$settings public_oe property

the social plugin settings. The following attributes are recognized: - repo: string the Github repository name. This is mandatory. - user: string the Github username that owns the repo. This is mandatory. - count: boolean whether to display the watchers or forks count. - size: the flag for using a larger button. The larger button option is 'large'.
public $settings

$type public_oe property

the type of button. One of 'watch', 'fork', 'follow'. This is mandatory.
public $type

$validPlugins protected_oe property

the valid plugins
protected $validPlugins