Same name in other branches
- 5.0.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::shouldGZip()
- 6.0.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::shouldGZip()
- 8.x-3.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::shouldGZip()
Determine if settings and available PHP modules allow GZipping assets.
Return value
bool True if asset type can/should be gzipped.
1 call to AssetOptimizer::shouldGZip()
- AssetOptimizer::__construct dans src/
Asset/ AssetOptimizer.php - Constructs the Optimizer object.
Fichier
-
src/
Asset/ AssetOptimizer.php, line 317
Classe
- AssetOptimizer
- Defines the base AdvAgg optimizer.
Namespace
Drupal\advagg\AssetCode
protected function shouldGZip() {
if (extension_loaded('zlib') && \Drupal::config('system.performance')->get($this->extension . '.gzip')) {
return TRUE;
}
return FALSE;
}