Class yii\authclient\widgets\GooglePlusButton
| Inheritance | yii\authclient\widgets\GooglePlusButton » yii\authclient\widgets\AuthChoiceItem » yii\base\Widget |
|---|---|
| Available since version | 2.0 |
GooglePlusButton renders Google+ sign-in button.
This widget is designed to interact with yii\authclient\clients\GoogleHybrid.
See also:
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $authChoice | yii\authclient\widgets\AuthChoice | Parent AuthChoice widget | yii\authclient\widgets\AuthChoiceItem |
| $buttonHtmlOptions | array | Button tag HTML options, which will be merged with the default ones. | yii\authclient\widgets\GooglePlusButton |
| $client | yii\authclient\ClientInterface | Auth client instance. | yii\authclient\widgets\AuthChoiceItem |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getCallback() | yii\authclient\widgets\GooglePlusButton | |
| init() | Initializes the widget. | yii\authclient\widgets\GooglePlusButton |
| run() | Runs the widget. | yii\authclient\widgets\GooglePlusButton |
| setCallback() | yii\authclient\widgets\GooglePlusButton |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| generateCallback() | Generates JavaScript callback function, which will be used to handle auth response. | yii\authclient\widgets\GooglePlusButton |
| registerClientScript() | Registers necessary JavaScript. | yii\authclient\widgets\GooglePlusButton |
| renderButton() | Renders sign-in button. | yii\authclient\widgets\GooglePlusButton |
Property Details
Method Details
Generates JavaScript callback function, which will be used to handle auth response.
| protected string generateCallback ( $url = [] ) | ||
| $url | array | Auth callback URL. |
| return | string | JavaScript function name. |
|---|---|---|
| public string getCallback ( ) | ||
| return | string | Callback JavaScript function name. |
|---|---|---|
Initializes the widget.
| public void init ( ) |
Registers necessary JavaScript.
| protected void registerClientScript ( ) |
Renders sign-in button.
| protected string renderButton ( ) | ||
| return | string | Button HTML. |
|---|---|---|
Runs the widget.
| public void run ( ) |
| public void setCallback ( $callback ) | ||
| $callback | string|array | Callback JavaScript function name or URL config. |