public function AdvaggCommands::forceNewAggregates in Advanced CSS/JS Aggregation 8.3
Same name and namespace in other branches
- 8.4 src/Commands/AdvaggCommands.php \Drupal\advagg\Commands\AdvaggCommands::forceNewAggregates()
Force the creation of all new files by incrementing a global counter.
@command advagg-force-new-aggregates @usage Standard example drush advagg-force-new-aggregates @aliases advagg-fna
File
- src/
Commands/ AdvaggCommands.php, line 138
Class
- AdvaggCommands
- Advagg commands for Drush 9+.
Namespace
Drupal\advagg\CommandsCode
public function forceNewAggregates() {
// Clear out the cache.
$this
->clearAllFiles();
// Increment counter.
$new_value = $this->advaggConfig
->get('global_counter') + 1;
$this->advaggConfig
->set('global_counter', $new_value)
->save();
$this
->logger()
->notice(dt('Global counter is now set to @new_value', [
'@new_value' => $new_value,
]));
_drupal_flush_css_js();
}