protected function CompressionFilter::defaultCompressionAlgorithm in Backup and Migrate 5.0.x
Get the default compression algorithm based on those available.
Return value
string The machine name of the algorithm.
1 call to CompressionFilter::defaultCompressionAlgorithm()
- CompressionFilter::configDefaults in src/
Core/ Filter/ CompressionFilter.php - Get the default values for the plugin.
File
- src/
Core/ Filter/ CompressionFilter.php, line 368
Class
Namespace
Drupal\backup_migrate\Core\FilterCode
protected function defaultCompressionAlgorithm() {
$available = array_keys($this
->availableCompressionAlgorithms());
// Remove the 'none' option.
array_shift($available);
$out = array_shift($available);
// Return the first available algorithm or 'none' of none other exist.
return $out ? $out : 'none';
}