function FileTransferAuthorizeForm::addConnectionSettings
Same name in other branches
- 8.9.x core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php \Drupal\Core\FileTransfer\Form\FileTransferAuthorizeForm::addConnectionSettings()
- 10 core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php \Drupal\Core\FileTransfer\Form\FileTransferAuthorizeForm::addConnectionSettings()
- 11.x core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php \Drupal\Core\FileTransfer\Form\FileTransferAuthorizeForm::addConnectionSettings()
Generates the Form API array for a given connection backend's settings.
Parameters
string $backend: The name of the backend (e.g. 'ftp', 'ssh', etc).
Return value
array Form API array of connection settings for the given backend.
See also
hook_filetransfer_backends()
1 call to FileTransferAuthorizeForm::addConnectionSettings()
- FileTransferAuthorizeForm::buildForm in core/
lib/ Drupal/ Core/ FileTransfer/ Form/ FileTransferAuthorizeForm.php - Form constructor.
File
-
core/
lib/ Drupal/ Core/ FileTransfer/ Form/ FileTransferAuthorizeForm.php, line 262
Class
- FileTransferAuthorizeForm
- Provides the file transfer authorization form.
Namespace
Drupal\Core\FileTransfer\FormCode
protected function addConnectionSettings($backend) {
$defaults = [];
$form = [];
// Create an instance of the file transfer class to get its settings form.
$filetransfer = $this->getFiletransfer($backend);
if ($filetransfer) {
$form = $filetransfer->getSettingsForm();
}
// Fill in the defaults based on the saved settings, if any.
$this->setConnectionSettingsDefaults($form, NULL, $defaults);
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.