class ThemeManager (View source)

phpMyAdmin theme manager

Constants

FALLBACK_THEME

Properties

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

Methods

__construct()

No description

static ThemeManager
getInstance()

Returns the singleton ThemeManager object

bool
setThemesPath(string $path)

sets path to folder containing the themes

void
setThemePerServer(bool $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(bool $form = true)

returns HTML selectbox, with or without form enclosed

string
getPrintPreviews()

Renders the previews for all themes

static void
initializeTheme()

Theme initialization

static string
getThemesFsDir()

Return the themes directory with a trailing slash

static string
getThemesDir()

Return the themes directory with a trailing slash as a relative public path

Details

__construct()

static ThemeManager getInstance()

Returns the singleton ThemeManager object

Return Value

ThemeManager The instance

bool setThemesPath(string $path)

sets path to folder containing the themes

Parameters

string $path path to themes folder

Return Value

bool success

void setThemePerServer(bool $per_server)

sets if there are different themes per server

Parameters

bool $per_server Whether to enable per server flag

Return Value

void

bool setActiveTheme(string $theme = null)

Sets active theme

Parameters

string $theme theme name

Return Value

bool true on success

string getThemeCookieName()

Returns name for storing theme

Return Value

string cookie name

string|bool getThemeCookie()

returns name of theme stored in the cookie

Return Value

string|bool theme name from cookie or false

bool setThemeCookie()

save theme in cookie

Return Value

bool true

bool loadThemes()

read all themes

Return Value

bool true

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

string getHtmlSelectBox(bool $form = true)

returns HTML selectbox, with or without form enclosed

Parameters

bool $form whether enclosed by from tags or not

Return Value

string

string getPrintPreviews()

Renders the previews for all themes

Return Value

string

static void initializeTheme()

Theme initialization

Return Value

void

static string getThemesFsDir()

Return the themes directory with a trailing slash

Return Value

string

static string getThemesDir()

Return the themes directory with a trailing slash as a relative public path

Return Value

string