securityContext = $securityContext; } public function setUserAgent($userAgent) { } /** * This should return the active theme for the logged in user. * No active theme for: * - anonymous user * - user without a config (shouldn't happen..) * * @return string */ public function getType() { $user = $this->securityContext->getToken()->getUser(); // anon user don't deserve a theme if (!$user instanceof User) { return false; } $config = $user->getConfig(); if (!$config) { return false; } return $config->getTheme(); } }