public function actionviewName), '_')) ?>() { $model = new modelClass ?>scenarioName) ? "()" : "(['scenario' => '{$generator->scenarioName}'])" ?>; if ($model->load(Yii::$app->request->post())) { if ($model->validate()) { // form inputs are valid, do something here return; } } return $this->render('viewName) ?>', [ 'model' => $model, ]); }