forked from Nodge/yii-eauth
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathEAuthRedirectWidget.php
41 lines (36 loc) · 922 Bytes
/
EAuthRedirectWidget.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* EAuthRedirectWidget class file.
*
* @author Maxim Zemskov <nodge@yandex.ru>
* @link http://github.com/Nodge/yii-eauth/
* @license http://www.opensource.org/licenses/bsd-license.php
*/
/**
* The EAuthRedirectWidget widget displays the redirect page after returning from provider.
* @package application.extensions.eauth
*/
class EAuthRedirectWidget extends CWidget {
/**
* @var mixed the widget mode. Default to "login".
*/
public $url = null;
/**
* @var boolean whether to use redirect inside the popup window.
*/
public $redirect = true;
public $view = 'redirect';
/**
* Executes the widget.
*/
public function run() {
$assets_path = dirname(__FILE__).DIRECTORY_SEPARATOR.'assets';
$this->render($this->view, array(
'id' => $this->getId(),
'url' => $this->url,
'redirect' => $this->redirect,
'assets_path' => $assets_path
));
Yii::app()->end();
}
}