summaryrefslogtreecommitdiff
path: root/framework/Web/TThemeManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/TThemeManager.php')
-rw-r--r--framework/Web/TThemeManager.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/framework/Web/TThemeManager.php b/framework/Web/TThemeManager.php
index 0a54cf8e..504e8ecb 100644
--- a/framework/Web/TThemeManager.php
+++ b/framework/Web/TThemeManager.php
@@ -45,7 +45,7 @@ class TThemeManager extends TComponent implements IModule
/**
* @var string module ID
*/
- private $_id;
+ private $_id='theme';
/**
* @var boolean whether this module has been initialized
*/
@@ -212,6 +212,10 @@ class TTheme extends TComponent
* @var array list of skins for the theme
*/
private $_skins=null;
+ /**
+ * @var string theme name
+ */
+ private $_name='';
/**
* Constructor.
@@ -223,6 +227,7 @@ class TTheme extends TComponent
public function __construct($application,$themePath,$themeUrl)
{
$this->_themeUrl=$themeUrl;
+ $this->_name=basename($themePath);
if(($cache=$application->getCache())!==null)
{
$array=$cache->get(self::THEME_CACHE_PREFIX.$themePath);
@@ -284,6 +289,14 @@ class TTheme extends TComponent
}
/**
+ * @return string theme name
+ */
+ public function getName()
+ {
+ return $this->_name;
+ }
+
+ /**
* Applies the theme to a particular control.
* The control's class name and SkinID value will be used to
* identify which skin to be applied. If the control's SkinID is empty,