Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 56 lines (50 sloc) 1.166 kb
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
<?php
/**
* Class file.
*
* @author Tobias Munk <schmunk@usrbin.de>
* @link http://www.phundament.com/
* @copyright Copyright &copy; 2005-2011 diemeisterei GmbH
* @license http://www.phundament.com/license/
*/

/**
* Desc
*
* Based upon http://www.yiiframework.com/doc/guide/1.1/en/database.migration#c2550 from Leric
*
* @author Tobias Munk <schmunk@usrbin.de>
* @package p3widgets.controllers
* @since 3.0.1
*/
class DefaultController extends Controller {

/**
* @return array action filters
*/
public function filters() {
return array(
'accessControl', // perform access control for CRUD operations
);
}

/**
* Specifies the access control rules.
* This method is used by the 'accessControl' filter.
* @return array access control rules
*/
public function accessRules() {
return array(
array('allow',
'actions'=>array('index','test'),
'expression' => 'Yii::app()->user->checkAccess("P3widgets.Default.*")||YII_DEBUG',
),
array('deny',
'users'=>array('*'),
),
);
}

public function actionIndex() {
$this->render('index');
}

public function actionTest() {
$this->render('test');
}

}
Something went wrong with that request. Please try again.