🆙 Add cms i using 🆙

This commit is contained in:
Remco
2025-11-25 22:42:56 +01:00
parent 94704e0925
commit d44196149e
35591 changed files with 3601123 additions and 0 deletions
@@ -0,0 +1,62 @@
<?php
namespace Qirolab\Theme;
class Theme
{
public static function finder()
{
return app('theme.finder');
}
public static function set(string $theme, string $parentTheme = null): void
{
self::finder()->setActiveTheme($theme, $parentTheme);
}
public static function clear(): void
{
self::finder()->clearThemes();
}
public static function active(): ?string
{
return self::finder()->getActiveTheme();
}
public static function parent(): ?string
{
return self::finder()->getParentTheme();
}
public static function viewPath(string $theme = null): ?string
{
$theme = $theme ?? self::active();
if ($theme) {
return self::finder()->getThemeViewPath($theme);
}
return null;
}
public static function path(string $path = null, string $theme = null): ?string
{
$theme = $theme ?? self::active();
if ($theme) {
return self::finder()->getThemePath($theme, $path);
}
return null;
}
public static function getViewPaths(): array
{
if (self::finder()) {
return self::finder()->getViewFinder()->getPaths();
}
return app('view')->getFinder()->getPaths();
}
}