Same name in other branches
- 5.0.x advagg.drush.inc \drush_advagg_clear_all_files()
- 6.0.x advagg.drush.inc \drush_advagg_clear_all_files()
- 7.x-2.x advagg.drush.inc \drush_advagg_clear_all_files()
- 8.x-3.x advagg.drush.inc \drush_advagg_clear_all_files()
- 8.x-4.x advagg.drush.inc \drush_advagg_clear_all_files()
Callback function for drush advagg-clear-all-files.
Callback is called by using drush_hook_command() where hook is the name of the module (advagg) and command is the name of the Drush command with all "-" characters converted to "_" characters.
File
-
./
advagg.drush.inc, line 96
Code
function drush_advagg_clear_all_files() {
// Run the command.
$css_files = \Drupal::service('asset.css.collection_optimizer')->deleteAllReal();
$js_files = \Drupal::service('asset.js.collection_optimizer')->deleteAllReal();
// Report back the results.
drush_log(dt('All AdvAgg files have been deleted. @css_count CSS files and @js_count JS files have been removed.', [
'@css_count' => count($css_files),
'@js_count' => count($js_files),
]), 'ok');
}