return $this->
dumpToUri($data,
$file_extension,
$uri);
} /**
* {@inheritdoc}
*/
public function dumpToUri(string
$data, string
$file_extension, string
$uri): string
{ $path = 'assets://' .
$file_extension;
// Create the CSS or JS file.
$this->fileSystem->
prepareDirectory($path, FileSystemInterface::CREATE_DIRECTORY
);
try { if (!
file_exists($uri) && !
$this->fileSystem->
saveData($data,
$uri, FileSystemInterface::EXISTS_REPLACE
)) { return FALSE;
} } catch (FileException
$e) { return FALSE;
} // If CSS/JS gzip compression is enabled and the zlib extension is available
// then create a gzipped version of this file. This file is served
// conditionally to browsers that accept gzip using .htaccess rules.
// It's possible that the rewrite rules in .htaccess aren't working on this
// server, but there's no harm (other than the time spent generating the