/** * Creates a new Event model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Event(); $map = new EventMap(); if ($model->load(Yii::$app->request->post()) && $model->editsave()) { Yii::$app->session->setFlash("event_notification", Yii::t("app", "Event Created!")); return $this->redirect(['index']); } else { return $this->render('create', ['model' => $model, 'map' => $map]); } }