Class yii\authclient\widgets\GooglePlusButton

Inheritanceyii\authclient\widgets\GooglePlusButton » yii\authclient\widgets\AuthChoiceItem » yii\base\Widget
Available since version2.0.4

GooglePlusButton renders Google+ sign-in button.

This widget is designed to interact with yii\authclient\clients\GoogleHybrid.

See also:

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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

Protected Methods

Hide inherited methods

MethodDescriptionDefined 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

$buttonHtmlOptions public property

Button tag HTML options, which will be merged with the default ones.

Method Details

generateCallback() protected method

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.

getCallback() public method

public string getCallback ( )
return string

Callback JavaScript function name.

init() public method

Initializes the widget.

public void init ( )
registerClientScript() protected method

Registers necessary JavaScript.

protected void registerClientScript ( )
renderButton() protected method

Renders sign-in button.

protected string renderButton ( )
return string

Button HTML.

run() public method

Runs the widget.

public void run ( )
setCallback() public method

public void setCallback ( $callback )
$callback string|array

Callback JavaScript function name or URL config.