PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TThemeManager

TThemeManager class

TThemeManager manages the themes used in a Prado application.

Themes are stored under the directory specified by the setBasePath BasePath property. The themes can be accessed via URL 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 TThemeManager::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 CacheExpire, getCacheControl CacheControl and getBufferOutput BufferOutput are configurable properties of THttpResponse.

TComponent
Extended by TApplicationComponent
Extended by TModule implements IModule
Extended by TThemeManager
Package: System\Web\UI
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Web/UI/TThemeManager.php
Methods summary
public
# init( TXmlElement $config )

Initializes the module. This method is required by IModule and is invoked by application.

Initializes the module. This method is required by IModule and is invoked by application.

Parameters

$config
TXmlElement
module configuration

Overrides

TModule::init()
public TTheme
# getTheme( string $name )

Parameters

$name
string
name of the theme to be retrieved

Returns

TTheme
the theme retrieved
public
# setThemeClass( string|null $class )

Parameters

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

Returns

string
Theme class name in namespace format. Defaults to TThemeManager::DEFAULT_THEMECLASS DEFAULT_THEMECLASS.
public array
# getAvailableThemes( )

Returns

array
list of available theme names
public string
# getBasePath( )

Returns

string
the base path for all themes. It is returned as an absolute path.

Throws

TConfigurationException
if base path is not set and "themes" directory does not exist.
public
# setBasePath( string $value )

Parameters

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

Throws

TInvalidDataValueException
if the base path is not a proper namespace.
public string
# getBaseUrl( )

Returns

string
the base URL for all themes.

Throws

TConfigurationException
If base URL is not set and a correct one cannot be determined by Prado.
public
# setBaseUrl( string $value )

Parameters

$value
string
the base URL for all themes.
Methods inherited from TModule
getID(), setID()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants summary
string DEFAULT_BASEPATH 'themes'
#

default themes base path

default themes base path

string DEFAULT_THEMECLASS 'TTheme'
#

default theme class

default theme class

Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO