You are here

function advagg_drush_help in Advanced CSS/JS Aggregation 8.4

Same name and namespace in other branches
  1. 8.2 advagg.drush.inc \advagg_drush_help()
  2. 8.3 advagg.drush.inc \advagg_drush_help()
  3. 7.2 advagg.drush.inc \advagg_drush_help()

Implements hook_drush_help().

Related topics

File

./advagg.drush.inc, line 25
Drush commands for Advanced CSS/JS Aggregation.

Code

function advagg_drush_help($command) {
  switch ($command) {
    case 'drush:advagg-da':
      return dt('Keep all Advagg settings but disable all functionality.');
    case 'drush:advagg-en':
      return dt('Restore all Advagg functionality if disabled.');
    case 'drush:advagg-cron':
      return dt('Run the advagg cron hook. This will clear out all stale advagg aggregated files, remove aggregates that include missing files, and remove unused aggregates.');
    case 'drush:advagg-clear-all-files':
      return dt('Remove all generated files. Useful if you think some of the generated files got corrupted and thus need to be deleted.');
    case 'drush:advagg-force-new-aggregates':

      /** @var \Drupal\Core\Config\Config $config */
      $config = \Drupal::service('config.factory')
        ->get('advagg.settings');
      return dt('Force the creation of all new optimized files by incrementing a global counter. Current value of counter: %value. This is may be useful if a CDN has cached an something incorrectly as it will force new ones to be used even if nothing else has changed.', [
        '%value' => $config
          ->get('global_counter'),
      ]);
  }
  return FALSE;
}