public function actionCreate($type = null)
 {
     $model = new Template();
     $model->setScenario('create');
     if (isset($type)) {
         $model->type = $type;
     }
     if ($model->load(Yii::$app->request->post(), 'Template') && $model->validate()) {
         if (TemplateService::create($model)) {
             return $this->redirect($this->returnUrl);
         }
     }
     return $this->render('@cmsgears/module-core/admin/views/template/create', ['model' => $model]);
 }