function FileTestSaveUploadFromForm::fileExistsFromName
Get a FileExists enum from its name.
1 call to FileTestSaveUploadFromForm::fileExistsFromName()
- FileTestSaveUploadFromForm::validateForm in core/
modules/ file/ tests/ file_test/ src/ Form/ FileTestSaveUploadFromForm.php  - Form validation handler.
 
File
- 
              core/
modules/ file/ tests/ file_test/ src/ Form/ FileTestSaveUploadFromForm.php, line 194  
Class
- FileTestSaveUploadFromForm
 - File test form class.
 
Namespace
Drupal\file_test\FormCode
protected static function fileExistsFromName(string $name) : FileExists {
  return match ($name) {  FileExists::Replace->name => FileExists::Replace,
    FileExists::Error->name => FileExists::Error,
    default => FileExists::Rename,
  
  };
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.