public function File::setFilename in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/file/src/Entity/File.php \Drupal\file\Entity\File::setFilename()
Sets the name of the file.
Parameters
string $filename: The file name that corresponds to this file. May differ from the basename of the URI and changing the filename does not change the URI.
Overrides FileInterface::setFilename
File
- core/
modules/ file/ src/ Entity/ File.php, line 53 - Contains \Drupal\file\Entity\File.
Class
- File
- Defines the file entity class.
Namespace
Drupal\file\EntityCode
public function setFilename($filename) {
$this
->get('filename')->value = $filename;
}