Class LoginThemeHelperBase
Class to assist the login theme cookies and Javascript. The login page has both the ability to change the background color and ability to change overall theme of the page. The cookie saved will be the background color and the theme name.
If the user is on default theme and changes the theme to dark theme, The app will change this users theme to the dark theme. If the user is on a custom theme and logs in with the default theme, the theme of the app will not change, to respect the option to have a default login page but a themed app.
The right most background color option will be the color of the theme background.
Package: application\components
Author: Alex Rowe <alex@x2engine.com>
Located at x2engine/protected/components/ThemeGenerator/LoginThemeHelperBase.php
public
|
#
__construct( )
The constructor does most of the work. Handles Posting expected on the login screen. |
public static
|
|
public static
|
|
public static
|
|
public
|
|
public static
|
|
public static
|
|
public
|
constant |
PROFILE_COOKIE
|
'profileTheme' |
#
name of cookie that saves the current profile theme |
constant |
LOGIN_THEME_COOKIE
|
'themeName' |
#
Name of the cookie that is the current theme of the login screen. This
gets |
constant |
LOGIN_BACKGROUND_COOKIE
|
'loginBackground' |
#
Name of the cookie that defines the login background color |
public static
integer
|
$cookieLength | 1209600 |
#
length of the cookies set |
public
string
|
$nextTheme |
|
#
name of the next theme. This will be the dark theme if the current theme is default |
public
string
|
$currentTheme |
|
#
name of the currently applied theme. |
public
string
|
$currentBackground |
|
#
color name of the background color currently set. |
public
mixed
|
$usingDarkTheme |
|
#
Whether or not user has a dark theme selected |