PHP Класс Prado\Web\UI\TThemeManager

TThemeManager manages the themes used in a Prado application. Themes are stored under the directory specified by the {@link setBasePath BasePath} property. The themes can be accessed via URL {@link setBaseUrl BaseUrl}. Each theme is represented by a subdirectory and all the files under that directory. The name of a theme is the name of the corresponding subdirectory. By default, the base path of all themes is a directory named "themes" under the directory containing the application entry script. To get a theme (normally you do not need to), call {@link getTheme}. TThemeManager may be configured within page service tag in application configuration file as follows, where {@link getCacheExpire CacheExpire}, {@link getCacheControl CacheControl} and {@link getBufferOutput BufferOutput} are configurable properties of THttpResponse.
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends Prado\TModule
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
getAvailableThemes ( ) : array
getBasePath ( ) : string
getBaseUrl ( ) : string
getTheme ( $name ) : TTheme
getThemeClass ( ) : string
init ( $config ) Initializes the module.
setBasePath ( $value )
setBaseUrl ( $value )
setThemeClass ( string | null $class )

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

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

public getAvailableThemes ( ) : array
Результат array list of available theme names

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

public getBasePath ( ) : string
Результат string the base path for all themes. It is returned as an absolute path.

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

public getBaseUrl ( ) : string
Результат string the base URL for all themes.

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

public getTheme ( $name ) : TTheme
Результат TTheme the theme retrieved

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

public getThemeClass ( ) : string
Результат string Theme class name in namespace format. Defaults to {@link TThemeManager::DEFAULT_THEMECLASS DEFAULT_THEMECLASS}.

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

This method is required by IModule and is invoked by application.
public init ( $config )

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

public setBasePath ( $value )

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

public setBaseUrl ( $value )

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

public setThemeClass ( string | null $class )
$class string | null Theme class name in namespace format