PHP 클래스 yii\authclient\widgets\AuthChoice

It opens a popup window for the client authentication process. By default this widget relies on presence of Collection among application components to get auth clients information. Example: php ['site/auth'] ]); ?> You can customize the widget appearance by using [[begin()]] and [[end()]] syntax along with using method AuthChoice::clientLink or AuthChoice::createClientUrl. For example: php ['site/auth'] ]); ?>
    getClients() as $client): ?>
  • clientLink($client) ?>
This widget supports following keys for [[ClientInterface::getViewOptions()]] result: - popupWidth: int, width of the popup window in pixels. - popupHeight: int, height of the popup window in pixels. - widget: array, configuration for the widget, which should be used to render a client link; such widget should be a subclass of [[AuthChoiceItem]].
또한 보기: yii\authclient\AuthAction
부터: 2.0
저자: Paul Klimov ([email protected])
상속: extends yii\base\Widget
파일 보기 프로젝트 열기: yiisoft/yii2-authclient 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$autoRender indicates if widget content, should be rendered automatically. Note: this value automatically set to 'false' at the first call of AuthChoice::createClientUrl
$clientCollection name of the auth client collection application component. This component will be used to fetch services value if it is not set.
$clientIdGetParamName name of the GET param , which should be used to passed auth client id to URL defined by [[baseAuthUrl]].
$clientOptions additional options to be passed to the underlying JS plugin.
$options the HTML attributes that should be rendered in the div HTML tag representing the container element.
$popupMode indicates if popup window should be used instead of direct links.

공개 메소드들

메소드 설명
clientLink ( yii\authclient\ClientInterface $client, string $text = null, array $htmlOptions = [] ) : string Outputs client auth link.
createClientUrl ( yii\authclient\ClientInterface $client ) : string Composes client auth URL.
getBaseAuthUrl ( ) : array
getClients ( ) : yii\authclient\ClientInterface[]
init ( ) Initializes the widget.
run ( ) : string Runs the widget.
setBaseAuthUrl ( array $baseAuthUrl )
setClients ( array $clients )

보호된 메소드들

메소드 설명
defaultBaseAuthUrl ( ) : array Composes default base auth URL configuration.
defaultClients ( ) : yii\authclient\ClientInterface[] Returns default auth clients list.
renderMainContent ( ) : string Renders the main content, which includes all external services links.

메소드 상세

createClientUrl() 공개 메소드

Composes client auth URL.
public createClientUrl ( yii\authclient\ClientInterface $client ) : string
$client yii\authclient\ClientInterface external auth client instance.
리턴 string auth URL.

defaultBaseAuthUrl() 보호된 메소드

Composes default base auth URL configuration.
protected defaultBaseAuthUrl ( ) : array
리턴 array base auth URL configuration.

defaultClients() 보호된 메소드

Returns default auth clients list.
protected defaultClients ( ) : yii\authclient\ClientInterface[]
리턴 yii\authclient\ClientInterface[] auth clients list.

getBaseAuthUrl() 공개 메소드

public getBaseAuthUrl ( ) : array
리턴 array base auth URL configuration.

getClients() 공개 메소드

public getClients ( ) : yii\authclient\ClientInterface[]
리턴 yii\authclient\ClientInterface[] auth providers

init() 공개 메소드

Initializes the widget.
public init ( )

renderMainContent() 보호된 메소드

Renders the main content, which includes all external services links.
protected renderMainContent ( ) : string
리턴 string generated HTML.

run() 공개 메소드

Runs the widget.
public run ( ) : string
리턴 string rendered HTML.

setBaseAuthUrl() 공개 메소드

public setBaseAuthUrl ( array $baseAuthUrl )
$baseAuthUrl array base auth URL configuration.

setClients() 공개 메소드

public setClients ( array $clients )
$clients array auth providers

프로퍼티 상세

$autoRender 공개적으로 프로퍼티

indicates if widget content, should be rendered automatically. Note: this value automatically set to 'false' at the first call of AuthChoice::createClientUrl
public $autoRender

$clientCollection 공개적으로 프로퍼티

name of the auth client collection application component. This component will be used to fetch services value if it is not set.
public $clientCollection

$clientIdGetParamName 공개적으로 프로퍼티

name of the GET param , which should be used to passed auth client id to URL defined by [[baseAuthUrl]].
public $clientIdGetParamName

$clientOptions 공개적으로 프로퍼티

additional options to be passed to the underlying JS plugin.
public $clientOptions

$options 공개적으로 프로퍼티

the HTML attributes that should be rendered in the div HTML tag representing the container element.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $options

$popupMode 공개적으로 프로퍼티

indicates if popup window should be used instead of direct links.
public $popupMode