function FileInterface::createFileUrl

Same name in other branches
  1. 9 core/modules/file/src/FileInterface.php \Drupal\file\FileInterface::createFileUrl()
  2. 8.9.x core/modules/file/src/FileInterface.php \Drupal\file\FileInterface::createFileUrl()
  3. 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

\Drupal\Core\File\FileUrlGeneratorInterface

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 75

Class

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

Namespace

Drupal\file

Code

public function createFileUrl($relative = TRUE);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.