class ThemeManager

phpMyAdmin theme manager

Constants

FALLBACK_THEME

Properties

array $themes
$cookie_name
boolean $per_server
string $active_theme
Theme $theme
string $theme_default

Methods

__construct()

Constructor for Theme Manager class

static ThemeManager
getInstance()

Returns the singleton ThemeManager object

boolean
setThemesPath(string $path)

sets path to folder containing the themes

void
setThemePerServer(boolean $per_server)

sets if there are different themes per server

bool
setActiveTheme(string $theme = null)

Sets active theme

string
getThemeCookieName()

Returns name for storing theme

string|bool
getThemeCookie()

returns name of theme stored in the cookie

bool
setThemeCookie()

save theme in cookie

bool
loadThemes()

read all themes

bool
checkTheme(string $theme)

checks if given theme name is a known theme

string
getHtmlSelectBox(boolean $form = true)

returns HTML selectbox, with or without form enclosed

string
getPrintPreviews()

Renders the previews for all themes

static void
initializeTheme()

Theme initialization

Details

at line 73
__construct()

Constructor for Theme Manager class

at line 122
static ThemeManager getInstance()

Returns the singleton ThemeManager object

Return Value

ThemeManager The instance

at line 138
boolean setThemesPath(string $path)

sets path to folder containing the themes

Parameters

string $path path to themes folder

Return Value

boolean success

at line 156
void setThemePerServer(boolean $per_server)

sets if there are different themes per server

Parameters

boolean $per_server Whether to enable per server flag

Return Value

void

at line 169
bool setActiveTheme(string $theme = null)

Sets active theme

Parameters

string $theme theme name

Return Value

bool true on success

at line 197
string getThemeCookieName()

Returns name for storing theme

Return Value

string cookie name

at line 213
string|bool getThemeCookie()

returns name of theme stored in the cookie

Return Value

string|bool theme name from cookie or false

at line 232
bool setThemeCookie()

save theme in cookie

Return Value

bool true

at line 275
bool loadThemes()

read all themes

Return Value

bool true

at line 322
bool checkTheme(string $theme)

checks if given theme name is a known theme

Parameters

string $theme name fo theme to check for

Return Value

bool

at line 335
string getHtmlSelectBox(boolean $form = true)

returns HTML selectbox, with or without form enclosed

Parameters

boolean $form whether enclosed by from tags or not

Return Value

string

at line 374
string getPrintPreviews()

Renders the previews for all themes

Return Value

string

at line 389
static void initializeTheme()

Theme initialization

Return Value

void