public function File::urlAbsolute in Bamboo Twig 8.4
Same name and namespace in other branches
- 8.5 bamboo_twig_file/src/TwigExtension/File.php \Drupal\bamboo_twig_file\TwigExtension\File::urlAbsolute()
- 8.2 bamboo_twig_file/src/TwigExtension/File.php \Drupal\bamboo_twig_file\TwigExtension\File::urlAbsolute()
- 8.3 bamboo_twig_file/src/TwigExtension/File.php \Drupal\bamboo_twig_file\TwigExtension\File::urlAbsolute()
Creates a web-accessible URL for a stream to an external or local file.
Parameters
string $uri: The URI to a file for which we need an external URL, or the path to a shipped file.
Return value
string A string containing a URL that may be used to access the file. If the provided string already contains a preceding 'http', 'https', or '/', nothing is done and the same string is returned. If a stream wrapper could not be found to generate an external URL, then FALSE is returned
File
- bamboo_twig_file/
src/ TwigExtension/ File.php, line 61
Class
- File
- Provides a 'File' Twig Extensions.
Namespace
Drupal\bamboo_twig_file\TwigExtensionCode
public function urlAbsolute($uri) {
return file_create_url($uri);
}