function drupal_get_filetransfer_info

Same name in other branches
  1. 7.x includes/common.inc \drupal_get_filetransfer_info()
  2. 9 core/includes/common.inc \drupal_get_filetransfer_info()
  3. 8.9.x core/includes/common.inc \drupal_get_filetransfer_info()
  4. 10 core/includes/common.inc \drupal_get_filetransfer_info()

Assembles the Drupal FileTransfer registry.

Return value

array The Drupal FileTransfer class registry.

See also

\Drupal\Core\FileTransfer\FileTransfer

hook_filetransfer_info()

hook_filetransfer_info_alter()

2 calls to drupal_get_filetransfer_info()
system_authorized_init in core/modules/system/system.module
Setup a given callback to run via authorize.php with elevated privileges.
_update_manager_check_backends in core/modules/update/update.manager.inc
Checks for file transfer backends and prepares a form fragment about them.

File

core/includes/common.inc, line 496

Code

function drupal_get_filetransfer_info() {
    $info =& drupal_static(__FUNCTION__);
    if (!isset($info)) {
        $info = \Drupal::moduleHandler()->invokeAll('filetransfer_info');
        \Drupal::moduleHandler()->alter('filetransfer_info', $info);
        uasort($info, [
            SortArray::class,
            'sortByWeightElement',
        ]);
    }
    return $info;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.