hook_filetransfer_info_alter

hook_filetransfer_info_alter(&$filetransfer_info)

Alter the FileTransfer class registry.

Parameters

array $filetransfer_info: Reference to a nested array containing information about the FileTransfer class registry.

See also

hook_filetransfer_info()

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

File

core/lib/Drupal/Core/File/file.api.php, line 186
Hooks related to the File management system.

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;
}
doc_Drupal
2016-10-29 09:18:12
Comments
Leave a Comment

Please login to continue.