Skip to content

Digging Deeper

İsa Eken edited this page Oct 2, 2021 · 1 revision

Helpers

    /**
     * Get theme system instance.
     *
     * @return ThemeSystem
     */
     function theme_system(): IsaEkem\ThemeSystem\ThemeSystem;

    /**
     * Get the path to the theme folder.
     *
     * @param  string  $path
     *
     * @return string|false
     */
     function theme_path(): string|false;

IsaEkem\ThemeSystem\ThemeSystem Class

interface ThemeSystem {

    /**
     * Check the Theme System is enabled.
     *
     * @return bool
     */
     public function isEnabled(): bool;

    /**
     * Check fallback is enabled.
     *
     * @return bool
     */
     public function isFallbackEnabled(): bool;

    /**
     * Check assets is enabled.
     *
     * @return bool
     */
     public function isAssetsEnabled(): bool;

    /**
     * Find themes.
     *
     * @return array
     */
     public function findThemes(): array;

    /**
     * Get public directory name.
     *
     * @return string
     */
     public function getPublicDirectory(): string;

    /**
     * Get a themes directory.
     *
     * @return string
     */
     public function getThemesDirectory(): string;

    /**
     * Get current theme name.
     *
     * @return string
     */
     public function getCurrentTheme(): string;

    /**
     * Get default theme name.
     *
     * @return string
     */
     public function getDefaultTheme(): string;

    /**
     * Get current theme directory.
     *
     * @param  bool|null  $fallback
     *
     * @return string
     */
     public function getCurrentThemeDirectory(bool|null $fallback = null): string;

    /**
     * Get default theme directory.
     *
     * @return string
     */
     public function getDefaultThemeDirectory(): string;

    /**
     * Change current theme.
     *
     * @param  string|null  $name
     *
     * @return $this
     */
     public function setTheme(string|null $name): self;

    /**
     * Check the theme is exists.
     *
     * @param  string  $name
     *
     * @return bool
     */
     public function isExists(string $name): bool;

    /**
     * Resolve theme directories.
     *
     * @return array
     */
     public function resolvePaths(string $name): array;

}

Clone this wiki locally