public function index() { global $wgLang, $wgUser; Wikia::addAssetsToOutput('global_navigation_scss'); Wikia::addAssetsToOutput('global_navigation_js'); //Lang for centralUrl and CNW should be the same as user language not content language //That's why $wgLang global is used $lang = $wgLang->getCode(); $centralUrl = $this->wikiaLogoHelper->getCentralUrlForLang($lang); $createWikiUrl = $this->helper->getCreateNewWikiUrl($lang); $userCanRead = $wgUser->isAllowed('read'); $this->response->setVal('centralUrl', $centralUrl); $this->response->setVal('createWikiUrl', $createWikiUrl); $this->response->setVal('notificationsEnabled', !empty($userCanRead)); $this->response->setVal('isAnon', $wgUser->isAnon()); $isGameStarLogoEnabled = $this->isGameStarLogoEnabled(); $this->response->setVal('isGameStarLogoEnabled', $isGameStarLogoEnabled); if ($isGameStarLogoEnabled) { $this->response->addAsset('extensions/wikia/GlobalNavigation/styles/GlobalNavigationGameStar.scss'); } }