コード例 #1
0
 /**
  * Basic Settings Form
  */
 public function actionBasic()
 {
     $form = new \humhub\modules\installer\forms\ConfigBasicForm();
     $form->name = Yii::$app->settings->get('name');
     if ($form->load(Yii::$app->request->post()) && $form->validate()) {
         Yii::$app->settings->set('name', $form->name);
         Yii::$app->settings->set('mailer.systemEmailName', $form->name);
         return $this->redirect(Yii::$app->getModule('installer')->getNextConfigStepUrl());
     }
     return $this->render('basic', array('model' => $form));
 }
コード例 #2
0
 /**
  * Basic Settings Form
  */
 public function actionBasic()
 {
     $form = new \humhub\modules\installer\forms\ConfigBasicForm();
     $form->name = Setting::Get('name');
     if ($form->load(Yii::$app->request->post()) && $form->validate()) {
         Setting::Set('name', $form->name);
         Setting::Set('systemEmailName', $form->name, 'mailing');
         return $this->redirect(Url::to(['/installer/config/admin']));
     }
     return $this->render('basic', array('model' => $form));
 }