X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/restate/platform/packages/theme/src
home
/
gfecatvj
/
sites
/
restate
/
platform
/
packages
/
theme
/
src
/
📁
..
📄
Asset.php
(2.63 KB)
📄
AssetContainer.php
(17.31 KB)
📄
Breadcrumb.php
(1.45 KB)
📁
Commands
📁
Contracts
📁
Events
📁
Exceptions
📁
Facades
📁
Forms
📁
Http
📄
Manager.php
(1.05 KB)
📁
Providers
📁
Services
📁
Supports
📄
Theme.php
(25.69 KB)
📄
ThemeOption.php
(15.21 KB)
Editing: Manager.php
<?php namespace Botble\Theme; class Manager { /** * @var array */ protected $themes = []; /** * Construct the class */ public function __construct() { $this->registerTheme(self::getAllThemes()); } /** * @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; } /** * @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 getThemes(): array { return $this->themes; } }
Upload File
Create Folder