public function actionIndex($lang = '')
    {
        $model = new InstallForm();

        if (!empty($lang)) {
            Yii::$app->language = $lang;
            $model->language = $lang;
        }

        if ($model->load(Yii::$app->request->post()) && $model->validate()) {

            $this->createEnvFile($model);

            Yii::$app->language = $model->language;
            Yii::$app->setTimeZone($model->timeZone);

            $installMessages = $this->processMigrations();
            $this->initRbac($model);

            $messages = $this->callModulesMethod('migrateUp');
            $installMessages .= implode('\n', $messages);

            $messages = $this->callModulesMethod('afterInstall');
            $installMessages .= implode('\n', $messages);

            return $this->render('resume', [
                'messages' => $installMessages
            ]);
        }

        return $this->render('index', [
            'model' => $model
        ]);
    }
public function actionIndex($lang = '')
    {
        $model = new InstallForm();

        if (!empty($lang)) {
            Yii::$app->language = $lang;
            $model->language = $lang;
        }

        if ($model->load(Yii::$app->request->post()) && $model->validate()) {

            $this->createEnvFile($model);

            Yii::$app->language = $model->language;
            Yii::$app->setTimeZone($model->timeZone);

            $installMessages = $this->processMigrations();
            $this->initRbac($model);

            $messages = $this->callModulesMethod('migrateUp');
            $installMessages .= implode('\n', $messages);

            $messages = $this->callModulesMethod('afterInstall');
            $installMessages .= implode('\n', $messages);

            return $this->render('resume', [
                'messages' => $installMessages
            ]);
        }

        return $this->render('index', [
            'model' => $model
        ]);
    }
public function actionIndex ( $ lang = '' ) { $ model = new InstallForm ( ) ; if ( ! empty ( $ lang ) ) { Yii :: $ app -> language = $ lang ; $ model -> language = $ lang ; } if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> validate ( ) ) { $ this -> createEnvFile ( $ model ) ; Yii :: $ app -> language = $ model -> language ; Yii :: $ app -> setTimeZone ( $ model -> timeZone ) ; $ installMessages = $ this -> processMigrations ( ) ; $ this -> initRbac ( $ model ) ; $ messages = $ this -> callModulesMethod ( 'migrateUp' ) ; $ installMessages .= implode ( '\n' , $ messages ) ; $ messages = $ this -> callModulesMethod ( 'afterInstall' ) ; $ installMessages .= implode ( '\n' , $ messages ) ; return $ this -> render ( 'resume' , [ 'messages' => $ installMessages ] ) ; } return $ this -> render ( 'index' , [ 'model' => $ model ] ) ; }
Display the install form

@param string $lang The lang to use

@return string
Display the install form