Esempio n. 1
0
 public function actionCreate($type = null)
 {
     $model = new Gallery();
     $model->type = $type;
     $model->setScenario('create');
     if ($model->load(Yii::$app->request->post(), 'Gallery') && $model->validate()) {
         if (GalleryService::create($model)) {
             $this->redirect($this->returnUrl);
         }
     }
     return $this->render('@cmsgears/module-core/admin/views/gallery/create', ['model' => $model]);
 }