summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TThemeManager.php
diff options
context:
space:
mode:
authorxue <>2006-05-29 03:08:07 +0000
committerxue <>2006-05-29 03:08:07 +0000
commit2ea02214b2fb6bedb58dbbd318ef171a9e146524 (patch)
tree16b12d9f68986fe204900d1cee4914a0a4035a7b /framework/Web/UI/TThemeManager.php
parent8c1edb7f4eced999c9704ec9ff7ba11d88248bbd (diff)
Merge from 3.0 branch till 1099.
Diffstat (limited to 'framework/Web/UI/TThemeManager.php')
-rw-r--r--framework/Web/UI/TThemeManager.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index 6a908759..fcb20a81 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -79,6 +79,23 @@ class TThemeManager extends TModule
}
/**
+ * @return array list of available theme names
+ */
+ public function getAvailableThemes()
+ {
+ $themes=array();
+ $basePath=$this->getBasePath();
+ $folder=@opendir($basePath);
+ while($file=@readdir($folder))
+ {
+ if($file!=='.' && $file!=='..' && $file!=='.svn' && is_dir($basePath.'/'.$file))
+ $themes[]=$file;
+ }
+ closedir($folder);
+ return $themes;
+ }
+
+ /**
* @return 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.
*/