PHP Класс PMA\libraries\ThemeManager

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$active_theme name of active theme
$cookie_name cookie name
$per_server boolean
$theme Theme active theme
$theme_default string
$themes available themes

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
_checkThemeFolder ( string $folder ) : boolean Checks whether folder is valid for storing themes

Описание методов

__construct() публичный Метод

Constructor for Theme Manager class
public __construct ( )

checkConfig() публичный Метод

Checks configuration
public checkConfig ( ) : void
Результат void

checkTheme() публичный Метод

checks if given theme name is a known theme
public checkTheme ( string $theme ) : boolean
$theme string name fo theme to check for
Результат boolean

getFallBackTheme() публичный Метод

returns Theme object for fall back theme
public getFallBackTheme ( ) : Theme
Результат Theme fall back theme

getHtmlSelectBox() публичный Метод

returns HTML selectbox, with or without form enclosed
public getHtmlSelectBox ( boolean $form = true ) : string
$form boolean whether enclosed by from tags or not
Результат string

getInstance() публичный статический Метод

Returns the singleton Response object
public static getInstance ( ) : Response
Результат Response object

getPrintPreviews() публичный Метод

Renders the previews for all themes
public getPrintPreviews ( ) : string
Результат string

getThemeCookie() публичный Метод

returns name of theme stored in the cookie
public getThemeCookie ( ) : string
Результат string theme name from cookie

getThemeCookieName() публичный Метод

Returns name for storing theme
public getThemeCookieName ( ) : string
Результат string cookie name

init() публичный Метод

Initialise the class
public init ( ) : void
Результат void

initializeTheme() публичный статический Метод

Theme initialization
public static initializeTheme ( ) : void
Результат void

loadThemes() публичный Метод

read all themes
public loadThemes ( ) : boolean
Результат boolean true

makeBc() публичный Метод

enables backward compatibility
public makeBc ( ) : void
Результат void

printCss() публичный Метод

prints css data
public printCss ( ) : boolean
Результат boolean

setActiveTheme() публичный Метод

Sets active theme
public setActiveTheme ( string $theme = null ) : boolean
$theme string theme name
Результат boolean true on success

setThemeCookie() публичный Метод

save theme in cookie
public setThemeCookie ( ) : boolean
Результат boolean true

setThemePerServer() публичный Метод

sets if there are different themes per server
public setThemePerServer ( boolean $per_server ) : void
$per_server boolean Whether to enable per server flag
Результат void

setThemesPath() публичный Метод

sets path to folder containing the themes
public setThemesPath ( string $path ) : boolean
$path string path to themes folder
Результат boolean success

Описание свойств

$active_theme публичное свойство

name of active theme
public $active_theme

$per_server публичное свойство

public bool $per_server
Результат boolean

$theme публичное свойство

Theme active theme
public $theme

$theme_default публичное свойство

public string $theme_default
Результат string

$themes публичное свойство

available themes
public $themes