/** * 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', // allow all users to perform 'index' and 'view' actions 'actions'=>array('index','view'), 'users'=>array('*'), ), array('allow', // allow authenticated user to perform 'create' and 'update' actions 'actions'=>array('create','update'), 'users'=>array('@'), ), array('allow', // allow admin user to perform 'admin' and 'delete' actions 'actions'=>array('admin','delete'), 'users'=>array('@'), ), array('deny', // deny all users 'users'=>array('*'), ), ); } /** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionView($id) { $fees_details = new FeesMasterTransaction('mysearch'); $fees_details->unsetAttributes(); // clear any default values if (isset($_GET['FeesMasterTransaction'])) { $fees_details->attributes = $_GET['FeesMasterTransaction']; } $this->render('view', array('model' => $this->loadModel($id), 'fees_details' => $fees_details)); }
/** * Manages all models. */ public function actionAdmin() { $model = new FeesMasterTransaction('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['FeesMasterTransaction'])) { $model->attributes = $_GET['FeesMasterTransaction']; } $this->render('admin', array('model' => $model)); }