public function File::url in Drupal 8
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);
}