private function HtmlAssetInliner::compress in TMGMT Translator Smartling 8
Same name and namespace in other branches
- 8.4 src/Context/HtmlAssetInliner.php \Drupal\tmgmt_smartling\Context\HtmlAssetInliner::compress()
- 8.2 src/Context/HtmlAssetInliner.php \Drupal\tmgmt_smartling\Context\HtmlAssetInliner::compress()
- 8.3 src/Context/HtmlAssetInliner.php \Drupal\tmgmt_smartling\Context\HtmlAssetInliner::compress()
Compresses generated page by removing extra whitespace
1 call to HtmlAssetInliner::compress()
- HtmlAssetInliner::getCompletePage in src/
Context/ HtmlAssetInliner.php - Gets complete page data and returns generated string
File
- src/
Context/ HtmlAssetInliner.php, line 279
Class
Namespace
Drupal\tmgmt_smartling\ContextCode
private function compress($string) {
# remove whitespace
return str_replace(array(
"\r\n",
"\r",
"\n",
"\t",
' ',
' ',
' ',
), ' ', $string);
}