protected function parseThemes()
    {
        foreach ($this->themesDirs as $dir) {
            $absDir = $this->fileLocator->locate($dir);
            $finder = Finder::create()->files()->in($absDir)->name('*.css');
            foreach ($finder as $file) {
                $this->addTheme($file->getBasename('.css'), $file->getPathname());
            }
        }
        #save to cache if env prod
        if ($this->env == 'prod') {
            $this->cacheDriver->save(static::CACHE_THEMES_NAME, $this->getThemes());
        }
    }
protected function parseThemes()
    {
        foreach ($this->themesDirs as $dir) {
            $absDir = $this->fileLocator->locate($dir);
            $finder = Finder::create()->files()->in($absDir)->name('*.css');
            foreach ($finder as $file) {
                $this->addTheme($file->getBasename('.css'), $file->getPathname());
            }
        }
        #save to cache if env prod
        if ($this->env == 'prod') {
            $this->cacheDriver->save(static::CACHE_THEMES_NAME, $this->getThemes());
        }
    }
protected function parseThemes ( ) { foreach ( $ this -> themesDirs as $ dir ) { $ absDir = $ this -> fileLocator -> locate ( $ dir ) ; $ finder = Finder :: create ( ) -> files ( ) -> in ( $ absDir ) -> name ( '*.css' ) ; foreach ( $ finder as $ file ) { $ this -> addTheme ( $ file -> getBasename ( '.css' ) , $ file -> getPathname ( ) ) ; } } #save to cache if env prod if ( $ this -> env == 'prod' ) { $ this -> cacheDriver -> save ( static :: CACHE_THEMES_NAME , $ this -> getThemes ( ) ) ; } }
Parse editor themes from dir
Parse editor themes from dir