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