hook_filetransfer_info()
Register information about FileTransfer classes provided by a module.
The FileTransfer class allows transferring files over a specific type of connection. Core provides classes for FTP and SSH. Contributed modules are free to extend the FileTransfer base class to add other connection types, and if these classes are registered via hook_filetransfer_info(), those connection types will be available to site administrators using the Update manager when they are redirected to the authorize.php script to authorize the file operations.
array Nested array of information about FileTransfer classes. Each key is a FileTransfer type (not human readable, used for form elements and variable names, etc), and the values are subarrays that define properties of that type. The keys in each subarray are:
\Drupal\Core\FileTransfer\FileTransfer
hook_filetransfer_info_alter()
drupal_get_filetransfer_info()
function hook_filetransfer_info() { $info['sftp'] = array( 'title' => t('SFTP (Secure FTP)'), 'class' => 'Drupal\Core\FileTransfer\SFTP', 'weight' => 10, ); return $info; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!File!file.api.php/function/hook_filetransfer_info/8.1.x