aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/ApplicationUtils.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/ApplicationUtils.php')
-rw-r--r--application/ApplicationUtils.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php
index a0f482b0..cc009a1d 100644
--- a/application/ApplicationUtils.php
+++ b/application/ApplicationUtils.php
@@ -195,4 +195,24 @@ class ApplicationUtils
195 195
196 return $errors; 196 return $errors;
197 } 197 }
198
199 /**
200 * Get a list of available themes.
201 *
202 * It will return the name of any directory present in the template folder.
203 *
204 * @param string $tplDir Templates main directory.
205 *
206 * @return array List of theme names.
207 */
208 public static function getThemes($tplDir)
209 {
210 $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR);
211 $themes = [];
212 foreach ($allTheme as $value) {
213 $themes[] = str_replace($tplDir.'/', '', $value);
214 }
215
216 return $themes;
217 }
198} 218}