src/Controller/LanguageController.php
private function getWarningLogs()
    {
        $melisTool  = $this->getServiceLocator()->get('MelisCoreTool');
        $moduleSvc  = $this->getServiceLocator()->get('ModulesService');
        $allModules = $moduleSvc->getAllModules();
        $excludeModules = ['MelisFront', 'MelisEngine', 'MelisInstaller', 'MelisAssetManager', 'MelisModuleConfig', 'MelisSites'];
        $modules    = [];
//         foreach($allModules as $module) {
//             if(!in_array($module, $excludeModules)) {
//                 $modules[] = $moduleSvc->getModulePath($module).'/language';
//             }
//         }

        $folderPath = [
            $_SERVER['DOCUMENT_ROOT'] . '../module/MelisModuleConfig/',
            $_SERVER['DOCUMENT_ROOT'] . '../module/MelisModuleConfig/languages',
            $_SERVER['DOCUMENT_ROOT'] . '../module/MelisModuleConfig/config',
            $_SERVER['DOCUMENT_ROOT'] . '../module/MelisModuleConfig/config/translation.list.php',
        ];

        $logs       = [];
        foreach(array_merge($modules, $folderPath) as $path) {
            if(file_exists($path)) {
                if(!is_readable($path)) {
                    // this folder is not readable
                    $logs[] = $melisTool->getTranslation('tr_meliscore_tool_language_lang_folder_not_readable', [$path]);
                }
                else {
                    if(!is_writable($path)) {
                        // this folder is not writable
                        $logs[] = $melisTool->getTranslation('tr_meliscore_tool_language_lang_folder_not_writable', [$path]);
                    }
                }
            }
//             else {
//                 $logs[] = $melisTool->getTranslation('tr_meliscore_tool_language_lang_folder_not_exist', [$path]);
//             }
        }

        return $logs;
    }
private function getWarningLogs()
    {
        $melisTool  = $this->getServiceLocator()->get('MelisCoreTool');
        $moduleSvc  = $this->getServiceLocator()->get('ModulesService');
        $allModules = $moduleSvc->getAllModules();
        $excludeModules = ['MelisFront', 'MelisEngine', 'MelisInstaller', 'MelisAssetManager', 'MelisModuleConfig', 'MelisSites'];
        $modules    = [];
//         foreach($allModules as $module) {
//             if(!in_array($module, $excludeModules)) {
//                 $modules[] = $moduleSvc->getModulePath($module).'/language';
//             }
//         }

        $folderPath = [
            $_SERVER['DOCUMENT_ROOT'] . '../module/MelisModuleConfig/',
            $_SERVER['DOCUMENT_ROOT'] . '../module/MelisModuleConfig/languages',
            $_SERVER['DOCUMENT_ROOT'] . '../module/MelisModuleConfig/config',
            $_SERVER['DOCUMENT_ROOT'] . '../module/MelisModuleConfig/config/translation.list.php',
        ];

        $logs       = [];
        foreach(array_merge($modules, $folderPath) as $path) {
            if(file_exists($path)) {
                if(!is_readable($path)) {
                    // this folder is not readable
                    $logs[] = $melisTool->getTranslation('tr_meliscore_tool_language_lang_folder_not_readable', [$path]);
                }
                else {
                    if(!is_writable($path)) {
                        // this folder is not writable
                        $logs[] = $melisTool->getTranslation('tr_meliscore_tool_language_lang_folder_not_writable', [$path]);
                    }
                }
            }
//             else {
//                 $logs[] = $melisTool->getTranslation('tr_meliscore_tool_language_lang_folder_not_exist', [$path]);
//             }
        }

        return $logs;
    }
private function getWarningLogs ( ) { $ melisTool = $ this -> getServiceLocator ( ) -> get ( 'MelisCoreTool' ) ; $ moduleSvc = $ this -> getServiceLocator ( ) -> get ( 'ModulesService' ) ; $ allModules = $ moduleSvc -> getAllModules ( ) ; $ excludeModules = [ 'MelisFront' , 'MelisEngine' , 'MelisInstaller' , 'MelisAssetManager' , 'MelisModuleConfig' , 'MelisSites' ] ; $ modules = [ ] ; //         foreach($allModules as $module) { //             if(!in_array($module, $excludeModules)) { //                 $modules[] = $moduleSvc->getModulePath($module).'/language'; //             } //         } $ folderPath = [ $ _SERVER [ 'DOCUMENT_ROOT' ] . '../module/MelisModuleConfig/' , $ _SERVER [ 'DOCUMENT_ROOT' ] . '../module/MelisModuleConfig/languages' , $ _SERVER [ 'DOCUMENT_ROOT' ] . '../module/MelisModuleConfig/config' , $ _SERVER [ 'DOCUMENT_ROOT' ] . '../module/MelisModuleConfig/config/translation.list.php' , ] ; $ logs = [ ] ; foreach ( array_merge ( $ modules , $ folderPath ) as $ path ) { if ( file_exists ( $ path ) ) { if ( ! is_readable ( $ path ) ) { // this folder is not readable $ logs [ ] = $ melisTool -> getTranslation ( 'tr_meliscore_tool_language_lang_folder_not_readable' , [ $ path ] ) ; } else { if ( ! is_writable ( $ path ) ) { // this folder is not writable $ logs [ ] = $ melisTool -> getTranslation ( 'tr_meliscore_tool_language_lang_folder_not_writable' , [ $ path ] ) ; } } } //             else { //                 $logs[] = $melisTool->getTranslation('tr_meliscore_tool_language_lang_folder_not_exist', [$path]); //             } } return $ logs ; }
Returns the possible folder or file issues
@return array
Returns the possible folder or file issues