PATH:
home
/
lab2454c
/
vaultchip.com
/
platform
/
packages
/
theme
/
src
<?php namespace Botble\Theme; class Manager { /** * @var array */ protected $themes = []; /** * Manager constructor. */ public function __construct() { $this->registerTheme(self::getAllThemes()); } /** * @param string|array $theme * @return void */ public function registerTheme($theme): void { if (!is_array($theme)) { $theme = [$theme]; } $this->themes = array_merge_recursive($this->themes, $theme); } /** * @return array */ public function getAllThemes(): array { $themes = []; $themePath = theme_path(); foreach (scan_folder($themePath) as $folder) { $theme = get_file_data($themePath . DIRECTORY_SEPARATOR . $folder . '/theme.json'); if (!empty($theme)) { $themes[$folder] = $theme; } } return $themes; } /** * @return array */ public function getThemes(): array { return $this->themes; } }
[+]
Exceptions
[+]
Forms
[-] Manager.php
[edit]
[+]
..
[-] Theme.php
[edit]
[-] ThemeOption.php
[edit]
[-] Asset.php
[edit]
[-] AssetContainer.php
[edit]
[+]
Events
[-] Breadcrumb.php
[edit]
[+]
Services
[+]
Contracts
[+]
Facades
[+]
Providers
[+]
Commands
[+]
Http
[+]
Supports