From 2ea02214b2fb6bedb58dbbd318ef171a9e146524 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 29 May 2006 03:08:07 +0000 Subject: Merge from 3.0 branch till 1099. --- framework/Web/UI/TThemeManager.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'framework/Web/UI/TThemeManager.php') 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 @@ -78,6 +78,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. -- cgit v1.2.3