public function actionDashboard() { $user = User::findOne(Yii::$app->user->id); if (isset($_POST['Widget'])) { $user = User::findOne(Yii::$app->user->id); $user->saveWidget($_POST['Widget']); Yii::$app->end(); } $messages = []; if (Yii::$app->params['local']) { $update = new Update(); $messages = $update->getMessages(); //[]; } foreach ($messages as $message) { \Yii::$app->getSession()->setFlash('error', "<h3>" . $message["title"] . "</h3><br>" . $message["data"]); } return $this->render('dashboard', array('user' => $user)); }
public function actionUpdate() { $model = new Update(); return $this->renderPartial('update', array('text' => $model->upgrade($model->getVersionI()))); }
public function actionAbout() { $model = new \app\models\Update(); return $this->render('about', ['version' => $model->getSVersion()]); }