PHP Class PMA\libraries\ThemeManager

Afficher le fichier Open project: phpmyadmin/phpmyadmin Class Usage Examples

Méthodes publiques

Свойство Type Description
$active_theme name of active theme
$cookie_name cookie name
$per_server boolean
$theme Theme active theme
$theme_default string
$themes available themes

Méthodes publiques

Méthode Description
__construct ( ) Constructor for Theme Manager class
checkConfig ( ) : void Checks configuration
checkTheme ( string $theme ) : boolean checks if given theme name is a known theme
getFallBackTheme ( ) : Theme returns Theme object for fall back theme
getHtmlSelectBox ( boolean $form = true ) : string returns HTML selectbox, with or without form enclosed
getInstance ( ) : Response Returns the singleton Response object
getPrintPreviews ( ) : string Renders the previews for all themes
getThemeCookie ( ) : string returns name of theme stored in the cookie
getThemeCookieName ( ) : string Returns name for storing theme
init ( ) : void Initialise the class
initializeTheme ( ) : void Theme initialization
loadThemes ( ) : boolean read all themes
makeBc ( ) : void enables backward compatibility
printCss ( ) : boolean prints css data
setActiveTheme ( string $theme = null ) : boolean Sets active theme
setThemeCookie ( ) : boolean save theme in cookie
setThemePerServer ( boolean $per_server ) : void sets if there are different themes per server
setThemesPath ( string $path ) : boolean sets path to folder containing the themes

Private Methods

Méthode Description
_checkThemeFolder ( string $folder ) : boolean Checks whether folder is valid for storing themes

Method Details

__construct() public méthode

Constructor for Theme Manager class
public __construct ( )

checkConfig() public méthode

Checks configuration
public checkConfig ( ) : void
Résultat void

checkTheme() public méthode

checks if given theme name is a known theme
public checkTheme ( string $theme ) : boolean
$theme string name fo theme to check for
Résultat boolean

getFallBackTheme() public méthode

returns Theme object for fall back theme
public getFallBackTheme ( ) : Theme
Résultat Theme fall back theme

getHtmlSelectBox() public méthode

returns HTML selectbox, with or without form enclosed
public getHtmlSelectBox ( boolean $form = true ) : string
$form boolean whether enclosed by from tags or not
Résultat string

getInstance() public static méthode

Returns the singleton Response object
public static getInstance ( ) : Response
Résultat Response object

getPrintPreviews() public méthode

Renders the previews for all themes
public getPrintPreviews ( ) : string
Résultat string

getThemeCookie() public méthode

returns name of theme stored in the cookie
public getThemeCookie ( ) : string
Résultat string theme name from cookie

getThemeCookieName() public méthode

Returns name for storing theme
public getThemeCookieName ( ) : string
Résultat string cookie name

init() public méthode

Initialise the class
public init ( ) : void
Résultat void

initializeTheme() public static méthode

Theme initialization
public static initializeTheme ( ) : void
Résultat void

loadThemes() public méthode

read all themes
public loadThemes ( ) : boolean
Résultat boolean true

makeBc() public méthode

enables backward compatibility
public makeBc ( ) : void
Résultat void

printCss() public méthode

prints css data
public printCss ( ) : boolean
Résultat boolean

setActiveTheme() public méthode

Sets active theme
public setActiveTheme ( string $theme = null ) : boolean
$theme string theme name
Résultat boolean true on success

setThemeCookie() public méthode

save theme in cookie
public setThemeCookie ( ) : boolean
Résultat boolean true

setThemePerServer() public méthode

sets if there are different themes per server
public setThemePerServer ( boolean $per_server ) : void
$per_server boolean Whether to enable per server flag
Résultat void

setThemesPath() public méthode

sets path to folder containing the themes
public setThemesPath ( string $path ) : boolean
$path string path to themes folder
Résultat boolean success

Property Details

$active_theme public_oe property

name of active theme
public $active_theme

$per_server public_oe property

public bool $per_server
Résultat boolean

$theme public_oe property

Theme active theme
public $theme

$theme_default public_oe property

public string $theme_default
Résultat string

$themes public_oe property

available themes
public $themes