## Class TThemeManager

Description

TThemeManager class

TThemeManager manages the themes used in a Prado application.

Themes are stored under the directory specified by the BasePath property. The themes can be accessed via URL 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 getTheme.

TThemeManager may be configured within page service tag in application configuration file as follows, <module id="themes" class="System.Web.UI.TThemeManager" BasePath="Application.themes" BaseUrl="/themes" /> where getCacheExpire, getCacheControl and getBufferOutput are configurable properties of THttpResponse.

- since: 3.0
- version: $Revision: $ $Date: $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/TThemeManager.php (line 39)

    TComponent
       |
       --TApplicationComponent
          |
          --TModule
             |
             --TThemeManager

Class Constant Summary
DEFAULT_BASEPATH = 'themes'
Method Summary
array getAvailableThemes ()
string getBasePath ()
string getBaseUrl ()
TTheme getTheme (string $name)
void init (TXmlElement $config)
void setBasePath (string $value)
void setBaseUrl (string $value)
Methods
getAvailableThemes (line 84)

- return: list of available theme names
- access: public

array getAvailableThemes ()
getBasePath (line 102)

- return: the base path for all themes. It is returned as an absolute path.
- access: public
- throws: TConfigurationException if base path is not set and "themes" directory does not exist.

string getBasePath ()
getBaseUrl (line 134)

- return: the base URL for all themes.
- access: public
- throws: TConfigurationException If base URL is not set and a correct one cannot be determined by Prado.

string getBaseUrl ()
getTheme (line 73)

- return: the theme retrieved
- access: public

TTheme getTheme (string $name)

- string $name: name of the theme to be retrieved

init (line 63)

Initializes the module.

This method is required by IModule and is invoked by application.

- access: public

void init (TXmlElement $config)

- TXmlElement $config: module configuration

Redefinition of:

TModule::init()
  Initializes the module.

setBasePath (line 118)

- access: public
- throws: TInvalidDataValueException if the base path is not a proper namespace.

void setBasePath (string $value)

- string $value: the base path for all themes. It must be in the format of a namespace.

setBaseUrl (line 151)

- access: public

void setBaseUrl (string $value)

- string $value: the base URL for all themes.

#### Inherited Methods

Inherited From TModule

> TModule::getID()
> TModule::init()
> TModule::setID()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Class Constants
DEFAULT_BASEPATH = 'themes' (line 44)

default themes base path

Documentation generated on Sun, 04 Jun 2006 19:00:34 -0400 by phpDocumentor 1.3.0RC4