Skip to content
Snippets Groups Projects

SFTP support

Open Borut Piletic requested to merge sftp into 8.x-1.x
6 files
+ 104
48
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -97,6 +97,15 @@ class FTPDirectorySync extends OperationPluginBase {
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);
$settings = $this->getEntity()->getPluginSettings();
$form['connection'] = [
'#type' => 'radios',
'#title' => $this->t('Connection type'),
'#default_value' => $settings['connection'] ?? 'ftp',
'#options' => [
'ftp' => $this->t('FTP'),
'sftp' => $this->t('SFTP'),
],
];
$form['username'] = [
'#type' => 'textfield',
'#title' => $this->t('Username'),
@@ -144,7 +153,7 @@ class FTPDirectorySync extends OperationPluginBase {
$form['passive'] = [
'#type' => 'checkbox',
'#title' => $this->t('Passive'),
'#description' => $this->t('Use passive FTP connection.'),
'#description' => $this->t('Use passive FTP connection (not supported by SFTP).'),
'#default_value' => $settings['passive'] ?? 1,
];
$form['log'] = [
Loading