public function allowedThemes()
    {
        if ($themes = self::$allowed_themes) {
            return ArrayLib::valuekey($themes);
        }

        $themes = [];
        if (is_dir(THEMES_PATH)) {
            foreach (scandir(THEMES_PATH) as $theme) {
                if ($theme[0] == '.') {
                    continue;
                }
                $theme = strtok($theme, '_');
                $themes[$theme] = $theme;
            }
            ksort($themes);
        }
        return $themes;
    }