From 1594d8562b7c45ce67a4a39e6090bf59e20d91f1 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Tue, 30 Aug 2011 10:19:46 +0000 Subject: reverted r3032, please look ticket #362 --- framework/Web/UI/TThemeManager.php | 41 ++++++++------------------------------ 1 file changed, 8 insertions(+), 33 deletions(-) (limited to 'framework/Web/UI/TThemeManager.php') 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) -- cgit v1.2.3