/** * Add the context the variables that are used to generated the output from the Views. */ public function AddGlobalAppVariables() { $context = new Context($this->app); $culture = $context->GetCultureLang() . "_" . $context->GetCultureRegion(); $this->page()->addVar('culture', $culture); $user = $this->app()->user->getAttribute(\Puzzlout\Framework\Enums\SessionKeys::UserConnected); $this->page()->addVar('user', $user[0]); $this->page()->addVar(Router::CurrentRouteVarKey, Router::Init($this->app)->currentRoute()); }