2016-09-14 54 views

回答

1

代碼按照DOC:http://www.yiiframework.com/doc-2.0/yii-authclient-widgets-authchoice.html 你可以試試:

$authAuthChoice->clientLink($client, 'content_of_your_<a>_tag', ['class' => 'class_of_your_<a>_tag']) 

我的例子:

$authAuthChoice->clientLink($client, 
'<span class="fa fa-'.$client->getName().'"></span> Sign in with '.$client->getTitle(), 
[ 
    'class' => 'btn btn-block btn-social btn-'.$client->getName(), 
]) 

你可以看到: - 文件:供應商/ yiisoft /警予/ authclient /部件/ AuthChoice.php - 行182:公共職能ClientLink技術($客戶端,$文字= null,數組$ htmlOptions = [ ])