Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Core\Theme; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * Theme Manager Contract Interface. |
| 13 | * |
| 14 | * Defines methods for theme management, active theme resolution, |
| 15 | * and theme template path resolution. |
| 16 | * |
| 17 | * @package App\Core\Theme |
| 18 | */ |
| 19 | interface ThemeManagerInterface |
| 20 | { |
| 21 | /** |
| 22 | * Default fallback theme identifier. |
| 23 | */ |
| 24 | public const DEFAULT_THEME = 'tabler'; |
| 25 | |
| 26 | /** |
| 27 | * List of supported application themes. |
| 28 | * |
| 29 | * @var array<int, string> |
| 30 | */ |
| 31 | public const SUPPORTED_THEMES = ['tabler']; |
| 32 | |
| 33 | /** |
| 34 | * Default color mode. |
| 35 | */ |
| 36 | public const DEFAULT_MODE = 'light'; |
| 37 | |
| 38 | /** |
| 39 | * List of supported color modes. |
| 40 | * |
| 41 | * @var array<int, string> |
| 42 | */ |
| 43 | public const SUPPORTED_MODES = ['light', 'dark']; |
| 44 | |
| 45 | /** |
| 46 | * Gets the currently active theme name. |
| 47 | * |
| 48 | * @return string Active theme name ('tabler'). |
| 49 | */ |
| 50 | public function getActiveTheme(): string; |
| 51 | |
| 52 | /** |
| 53 | * Sets the active theme name. |
| 54 | * |
| 55 | * @param string $theme Theme name to set. |
| 56 | * @return void |
| 57 | */ |
| 58 | public function setActiveTheme(string $theme): void; |
| 59 | |
| 60 | /** |
| 61 | * Checks if a theme name is supported by the system. |
| 62 | * |
| 63 | * @param string $theme Theme name to validate. |
| 64 | * @return bool True if supported, false otherwise. |
| 65 | */ |
| 66 | public function isSupportedTheme(string $theme): bool; |
| 67 | |
| 68 | /** |
| 69 | * Resolves the full layout template path for a given layout name. |
| 70 | * |
| 71 | * @param string $layoutName Layout file name (e.g. 'admin_main', 'guest_auth'). |
| 72 | * @return string Relative Twig template path. |
| 73 | */ |
| 74 | public function resolveLayoutPath(string $layoutName): string; |
| 75 | } |