You are here

public function FileInterface::createFileUrl in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/file/src/FileInterface.php \Drupal\file\FileInterface::createFileUrl()
  2. 10 core/modules/file/src/FileInterface.php \Drupal\file\FileInterface::createFileUrl()

Creates a file URL for the URI of this file.

Parameters

bool $relative: (optional) Whether the URL should be root-relative, defaults to TRUE.

Return value

string A string containing a URL that may be used to access the file.

See also

file_create_url()

file_url_transform_relative()

1 method overrides FileInterface::createFileUrl()
File::createFileUrl in core/modules/file/src/Entity/File.php
Creates a file URL for the URI of this file.

File

core/modules/file/src/FileInterface.php, line 65

Class

FileInterface
Defines getter and setter methods for file entity base fields.

Namespace

Drupal\file

Code

public function createFileUrl($relative = TRUE);