Class \Prado\Web\UI\TTheme
TTheme represents a particular theme. It is merely a collection of skins that are applicable to the corresponding controls.
Each theme is stored as a directory and files under that directory. The theme name is the directory name. When TTheme is created, the files whose name has the extension ".skin" are parsed and saved as controls skins.
A skin is essentially a list of initial property values that are to be applied to a control when the skin is applied. TSkinTemplate is used to turn off class and attribute validation. Each type of control can have multiple skins identified by the SkinID. If a skin does not have SkinID, it is the default skin that will be applied to controls that do not specify particular SkinID.
For globalization, Themes remove all css files that end in ".*rtl.css" or ".*rtl.(media).css". Then if there is Application Globalization, and globalization current culture is Right-to-left then the rtl css files are re-added at the end of the css files so rtl css has priority.
Whenever possible, TTheme will try to make use of available cache to save the parsing time.
To apply a theme to a particular control, call applySkin.
Class hierarchy
Author: Qiang Xue <qiang.xue@gmail.com>Since: 3.0
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
postProcessCssRTL() : mixed
This post-processes the theme for RTL. It loops through all the
css files, removes all the '.*rtl.css' and '.*rtl.(media).css' files,
then if there is globalization and globalization is RTL then re-adds
the rtl css at the end.
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
public
mixed
|
SKIN_FILE_EXT
Extension name of skin files
|
'.skin'
|
public
mixed
|
THEME_CACHE_PREFIX
prefix for cache variable name used to store parsed themes
|
'prado:theme:'
|
\Prado\TApplicationComponent::FX_CACHE_FILE, \Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |