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.
Since: 3.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends Prado\TModule
Example #1
0
 private function _startThemeManager()
 {
     $themeManager = new TThemeManager();
     $themeManager->BasePath = "System.Wsat.themes";
     $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat'));
     $themeManager->BaseUrl = "{$url}/themes";
     $themeManager->init(null);
     $this->setThemeManager($themeManager);
 }