function File::url
Overrides EntityBase::url
See also
File
-
core/
modules/ file/ src/ Entity/ File.php, line 94
Class
- File
- Defines the file entity class.
Namespace
Drupal\file\EntityCode
public function url($rel = 'canonical', $options = []) {
@trigger_error('File entities returning the URL to the physical file in File::url() is deprecated, use $file->createFileUrl() instead. See https://www.drupal.org/node/3019830', E_USER_DEPRECATED);
return $this->createFileUrl(FALSE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.