Property | Type | Description | |
---|---|---|---|
$label | the button label to display. If not set it will be autogenerated based on the button type. | ||
$options | the HTML attributes for the button | ||
$repo | the Github repository name. This is mandatory for all buttons except FOLLOW. | ||
$settings | the social plugin settings. The following attributes are recognized: - href: GitHub link for the button. - data-style: controls the size of the button one of default or mega. - data-icon: string, the octicon for the button. It will be autogenerated if not set. All available icons can be found at Octicons. - data-count-href: GitHub link for the count. It defaults to href value (generated from repo and user name). Relative url will be relative to href value. It will be autogenerated if not set. - data-count-api: string, GitHub API endpoint for the count. It will be autogenerated if not set. | ||
$showCount | whether to show the count. Defaults to true. | ||
$type | the type of button. One of 'watch', 'fork', 'follow'. This is mandatory. | ||
$user | the Github user name that owns the repo. This is mandatory. |
Property | Type | Description | |
---|---|---|---|
$validPlugins | the valid plugins |
Method | Description | |
---|---|---|
getDefaultSetting ( ) : array | Gets the default button configurations settings | |
init ( ) | Initialize the widget | |
renderButton ( ) : string | Renders the button | |
run ( ) |
public getDefaultSetting ( ) : array | ||
return | array |
public $label |
public $repo |
public $settings |
public $type |