diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 12:07:13 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 12:07:13 +0200 |
commit | d9f6275ebca035fec8331652c677981056793ccc (patch) | |
tree | 37a64baf4f0eba6b781040605965383d8aded2cc /application/ThemeUtils.php | |
parent | 38672ba0d1c722e5d6d33a58255ceb55e9410e46 (diff) | |
parent | d63ff87a009313141ae684ec447b902562ff6ee7 (diff) | |
download | Shaarli-stable.tar.gz Shaarli-stable.tar.zst Shaarli-stable.zip |
Merge branch 'v0.11' into stablestable
Diffstat (limited to 'application/ThemeUtils.php')
-rw-r--r-- | application/ThemeUtils.php | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/application/ThemeUtils.php b/application/ThemeUtils.php deleted file mode 100644 index 16f2f6a2..00000000 --- a/application/ThemeUtils.php +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Shaarli; | ||
4 | |||
5 | /** | ||
6 | * Class ThemeUtils | ||
7 | * | ||
8 | * Utility functions related to theme management. | ||
9 | * | ||
10 | * @package Shaarli | ||
11 | */ | ||
12 | class ThemeUtils | ||
13 | { | ||
14 | /** | ||
15 | * Get a list of available themes. | ||
16 | * | ||
17 | * It will return the name of any directory present in the template folder. | ||
18 | * | ||
19 | * @param string $tplDir Templates main directory. | ||
20 | * | ||
21 | * @return array List of theme names. | ||
22 | */ | ||
23 | public static function getThemes($tplDir) | ||
24 | { | ||
25 | $tplDir = rtrim($tplDir, '/'); | ||
26 | $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR); | ||
27 | $themes = []; | ||
28 | foreach ($allTheme as $value) { | ||
29 | $themes[] = str_replace($tplDir.'/', '', $value); | ||
30 | } | ||
31 | |||
32 | return $themes; | ||
33 | } | ||
34 | } | ||