Javascript Yii中控制器操作的对话框

Javascript Yii中控制器操作的对话框,javascript,php,yii,model,controller,Javascript,Php,Yii,Model,Controller,这个函数在yii“asDialog”中的含义是什么?我试着用谷歌搜索,但在任何地方都找不到。我在控制器中特定操作的对话框代码中也看到了这一点。有人能解释这个函数的含义吗 public function actionCreate() { $model=new Vegetable; if (Yii::app()->request->isAjaxRequest) { $this->renderPartial('create', array

这个函数在yii“asDialog”中的含义是什么?我试着用谷歌搜索,但在任何地方都找不到。我在控制器中特定操作的对话框代码中也看到了这一点。有人能解释这个函数的含义吗

public function actionCreate()
{   
    $model=new Vegetable;
    if (Yii::app()->request->isAjaxRequest)
    {
        $this->renderPartial('create', array('model'=>$model, 'asDialog'=>!empty($_GET['asDialog']),), false, true);
        Yii::app()->user->setReturnUrl($_GET['returnUrl']);
        Yii::app()->end();
    }
    else 
    {
        if(isset($_POST['Vegetable']))
        {
            $model->attributes=$_POST['Vegetable'];
            $model->image=CUploadedFile::getInstance($model,'image');
            $model->image=CUploadedFile::$model->image;
            if($model->save())
            {
                echo "hi";
                //$model->image->saveAs(Yii::app()->baseUrl.'/images/vegetables/').$model->image);
                $model->image->saveAs(Yii::app()->request->baseUrl.'/images/carausel/'.$model->image);
                //$this->redirect(Yii::app()->user->returnUrl);
            }
            $this->render('create', array('model'=>$model));

        } 
    }
}

CController::renderPartial()
的第二个参数是要提取到PHP变量中并可供视图脚本使用的数据数组

该数组中的键,
model
asDialog
,仅对相应的视图页面有用/有意义,并且不配置renderPartial方法

这意味着在视图页面create.php中,该页面可以访问php变量
$model
$asDialog


您在哪里看到此功能?在一些文档中?或者在某人的代码中?我在代码中看到了。我将粘贴它。请看一下yii中的renderPartial