Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function actionCreate()
- {
- $model=new CrossWork;
- $showSourceOwnerList = true;
- // Uncomment the following line if AJAX validation is needed
- // $this->performAjaxValidation($model);
- if(!Yii::app()->user->checkAccess('create.any.crosswork')){
- $model->source_owner_id = Yii::app()->user->id;
- $showSourceOwnerList = false;
- }
- if(isset($_POST['CrossWork']))
- {
- $model->attributes=$_POST['CrossWork'];
- if($model->save())
- $this->redirect(array('view','id'=>$model->id));
- }
- $this->render('create',array(
- 'model'=>$model,
- 'showSourceOwnerList'=>$showSourceOwnerList,
- ));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement