PHP code example of craftsnippets / static-file-manager

1. Go to this page and download the library: Download craftsnippets/static-file-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

craftsnippets / static-file-manager example snippets



return [
   'filesList' => [
        'some-file.css',
        'other-file.js',
   ],
   
   'cpFileList' => [
        'some-control-panel-styles.css',
   ],
   'faviconPath' => 'some-favicon.png',
   'cpFaviconPath' => 'some-control-panel-favicon.png',
];


return [
   'filesList' => [
        function(){
            $language = Craft::$app->getSites()->currentSite->language;
            if($language == 'en'){
                    return 'english-file.js';
            }else{
                    return 'non-english-file.js';
            }
        }
   ]
];