user->isGuest) { $this->getUserManager()->updateUserLastConnection(Yii::$app->user->identity); } return parent::beforeAction($event); } public function getLogic(): BusinessLogic { return Yii::$app->logic; } public function getUrlManagerProducer() { return Yii::$app->urlManagerProducer; } public function getUrlManagerFrontend() { return Yii::$app->urlManagerFrontend; } public function getUrlManagerBackend() { return Yii::$app->urlManagerBackend; } public function getUserCurrent(): ?User { return Yii::$app->user->identity; } public function isUserCurrentAdmin() { return $this->getUserManager()->isAdmin($this->getUserCurrent()); } public function getRequest() { return Yii::$app->request; } public function setFlash($key, $value = true, $removeAfterAccess = true) { Yii::$app->session->setFlash($key, $value, $removeAfterAccess); } } ?>