src/BoomCMS/Theme/ThemeManager.php
public function findAndInstallThemes(): array
    {
        $theme = new Theme();
        $directories = $this->filesystem->directories($theme->getThemesDirectory());
        $themes = [];

        if (is_array($directories)) {
            foreach ($directories as $directory) {
                $themeName = basename($directory);
                $themes[] = new Theme($themeName);
            }
        }

        $this->cache->forever($this->cacheKey, $themes);

        return $themes;
    }
public function findAndInstallThemes(): array
    {
        $theme = new Theme();
        $directories = $this->filesystem->directories($theme->getThemesDirectory());
        $themes = [];

        if (is_array($directories)) {
            foreach ($directories as $directory) {
                $themeName = basename($directory);
                $themes[] = new Theme($themeName);
            }
        }

        $this->cache->forever($this->cacheKey, $themes);

        return $themes;
    }
public function findAndInstallThemes ( ) : array { $ theme = new Theme ( ) ; $ directories = $ this -> filesystem -> directories ( $ theme -> getThemesDirectory ( ) ) ; $ themes = [ ] ; if ( is_array ( $ directories ) ) { foreach ( $ directories as $ directory ) { $ themeName = basename ( $ directory ) ; $ themes [ ] = new Theme ( $ themeName ) ; } } $ this -> cache -> forever ( $ this -> cacheKey , $ themes ) ; return $ themes ; }
Create a cache of the themes which are available on the filesystem.
Create a cache of the themes which are available on the filesystem .