summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TThemeManager.php
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-08-30 10:19:46 +0000
committerctrlaltca@gmail.com <>2011-08-30 10:19:46 +0000
commit1594d8562b7c45ce67a4a39e6090bf59e20d91f1 (patch)
tree7f5d3bdf0c8a9e89b34ab77b1bb27f360d7c0315 /framework/Web/UI/TThemeManager.php
parentca0ae9bca6fea1a8ef924104b09649e41ea5ab36 (diff)
reverted r3032, please look ticket #362
Diffstat (limited to 'framework/Web/UI/TThemeManager.php')
-rw-r--r--framework/Web/UI/TThemeManager.php41
1 files changed, 8 insertions, 33 deletions
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index ca6f5d91..ba4fa81d 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -80,7 +80,8 @@ class TThemeManager extends TModule
{
$themePath=$this->getBasePath().DIRECTORY_SEPARATOR.$name;
$themeUrl=rtrim($this->getBaseUrl(),'/').'/'.$name;
- return Prado::createComponent($this->getThemeClass(), $themePath, $themeUrl);
+ return new TTheme($themePath,$themeUrl);
+
}
/**
@@ -195,17 +196,6 @@ class TTheme extends TApplicationComponent implements ITheme
* Extension name of skin files
*/
const SKIN_FILE_EXT='.skin';
-
- /**
- * default theme class
- */
- const DEFAULT_THEMECLASS = 'TTheme';
-
- /**
- * @var string
- */
- private $_themeClass=self::DEFAULT_THEMECLASS;
-
/**
* @var string theme path
*/
@@ -338,7 +328,7 @@ class TTheme extends TApplicationComponent implements ITheme
return $this->_name;
}
- /**
+ /**
* @param string theme name
*/
protected function setName($value)
@@ -354,7 +344,7 @@ class TTheme extends TApplicationComponent implements ITheme
return $this->_themeUrl;
}
- /**
+ /**
* @param string the URL to the theme folder
*/
protected function setBaseUrl($value)
@@ -370,29 +360,14 @@ class TTheme extends TApplicationComponent implements ITheme
return $this->_themePath;
}
- /**
+ /**
* @param string tthe file path to the theme folder
*/
protected function setBasePath($value)
{
$this->_themePath=$value;
}
-
- /**
- * @param string|null $class Theme class name in namespace format
- */
- public function setThemeClass($class) {
- $this->_themeClass = $class===null ? self::DEFAULT_THEMECLASS : (string)$class;
-
- }
-
- /**
- * @return string Theme class name in namespace format. Defaults to {@link TThemeManager::DEFAULT_THEMECLASS DEFAULT_THEMECLASS}.
- */
- public function getThemeClass() {
- return $this->_themeClass;
- }
-
+
/**
* @return array list of skins for the theme
*/
@@ -401,7 +376,7 @@ class TTheme extends TApplicationComponent implements ITheme
return $this->_skins;
}
- /**
+ /**
* @param array list of skins for the theme
*/
protected function setSkins($value)
@@ -490,7 +465,7 @@ class TTheme extends TApplicationComponent implements ITheme
return $this->_cssFiles;
}
- /**
+ /**
* @param array list of CSS files (URL) in the theme
*/
protected function setStyleSheetFiles($value)