public function FileUploadResult::setFile in Drupal 10
Sets the File entity.
Parameters
\Drupal\file\FileInterface $file: A file entity.
Return value
$this
File
- core/
modules/ file/ src/ Upload/ FileUploadResult.php, line 93
Class
- FileUploadResult
- Value object for a file upload result.
Namespace
Drupal\file\UploadCode
public function setFile(FileInterface $file) : FileUploadResult {
$this->file = $file;
return $this;
}