function hook_filetransfer_info_alter
Same name in other branches
- 7.x modules/system/system.api.php \hook_filetransfer_info_alter()
- 9 core/lib/Drupal/Core/File/file.api.php \hook_filetransfer_info_alter()
- 8.9.x core/lib/Drupal/Core/File/file.api.php \hook_filetransfer_info_alter()
- 10 core/lib/Drupal/Core/File/file.api.php \hook_filetransfer_info_alter()
Alter the FileTransfer class registry.
Parameters
array $filetransfer_info: Reference to a nested array containing information about the FileTransfer class registry.
Deprecated
in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site.
See also
https://www.drupal.org/node/3512364
Related topics
File
-
core/
lib/ Drupal/ Core/ File/ file.api.php, line 203
Code
function hook_filetransfer_info_alter(&$filetransfer_info) {
// Remove the FTP option entirely.
unset($filetransfer_info['ftp']);
// Make sure the SSH option is listed first.
$filetransfer_info['ssh']['weight'] = -10;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.