Same name in other branches
- 6.0.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::shouldBrotli()
- 8.x-3.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 in src/
Asset/ AssetOptimizer.php - Constructs the Optimizer object.
File
-
src/
Asset/ AssetOptimizer.php, line 330
Class
- 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;
}