function FileTestForm::fileExistsFromName
Same name in other branches
- 11.x core/modules/file/tests/file_test/src/Form/FileTestForm.php \Drupal\file_test\Form\FileTestForm::fileExistsFromName()
Get a FileExists enum from its name.
1 call to FileTestForm::fileExistsFromName()
- FileTestForm::submitForm in core/
modules/ file/ tests/ file_test/ src/ Form/ FileTestForm.php - Form submission handler.
File
-
core/
modules/ file/ tests/ file_test/ src/ Form/ FileTestForm.php, line 136
Class
- FileTestForm
- 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.