protected function parseModes()
    {
        foreach ($this->modeDirs as $dir) {
            $absDir = $this->fileLocator->locate($dir);

            $finder = Finder::create()->files()->in($absDir)->notName("*test.js")->name('*.js');
            
            foreach ($finder as $file) {
                $this->addModesFromFile($dir,$file);
            }
        }
        #save to cache if env prod
        if ($this->env == 'prod') {
            $this->cacheDriver->save(static::CACHE_MODES_NAME, $this->getModes());
        }
    }
protected function parseModes()
    {
        foreach ($this->modeDirs as $dir) {
            $absDir = $this->fileLocator->locate($dir);

            $finder = Finder::create()->files()->in($absDir)->notName("*test.js")->name('*.js');
            
            foreach ($finder as $file) {
                $this->addModesFromFile($dir,$file);
            }
        }
        #save to cache if env prod
        if ($this->env == 'prod') {
            $this->cacheDriver->save(static::CACHE_MODES_NAME, $this->getModes());
        }
    }
protected function parseModes ( ) { foreach ( $ this -> modeDirs as $ dir ) { $ absDir = $ this -> fileLocator -> locate ( $ dir ) ; $ finder = Finder :: create ( ) -> files ( ) -> in ( $ absDir ) -> notName ( "*test.js" ) -> name ( '*.js' ) ; foreach ( $ finder as $ file ) { $ this -> addModesFromFile ( $ dir , $ file ) ; } } #save to cache if env prod if ( $ this -> env == 'prod' ) { $ this -> cacheDriver -> save ( static :: CACHE_MODES_NAME , $ this -> getModes ( ) ) ; } }
Parse editor mode from dir
Parse editor mode from dir